Answer to Question #252726 in Python for Chem

Question #252726
More Loops: All versions of foods.py in this section have avoided using for loops when printing to save space. Choose a version of foods.py, and write two for loops to print each list of .
foods?
1
Expert's answer
2021-10-18T00:14:50-0400
list1=[[1,2,3,4,5],["Apple","Banana","Avocado","Oranges","Mango"]]


for i in range(len(list1)):
    for j in range(len(list1[i])):
        print(list1[i][j], end='\t')
    print()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS