Answer to Question #291952 in Python for Karan

Question #291952

We have two lists. L1 = ['Coffee', 'Tea'] L2 = ['Hot', 'Ice']. Using a nested while loop compute the following output: Coffee * Hot * Ice Tea * Hot * Ice


1
Expert's answer
2022-01-29T13:02:38-0500
# Python 3.9.5

L1 = ['Coffee', 'Tea']
L2 = ['Hot', 'Ice']
i = 0
while i < len(L1):
    print(f'{L1[i]}*{L2[0]}*{L2[1]}')
    i += 1

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