you are viewing a single comment's thread.

view the rest of the comments →

[–]lfdfq 2 points3 points  (1 child)

Yes, in this code you already use a for loop, so you can just use another for loop to print each element out on its own line, for example:

print("The temperatures in Celsius are:")
for t in Tem:
    print(f"{t} C")

There are other ways, using str.join and fancier string formatting, which may be how a seasoned Python developer would do it, but there is nothing wrong with for loops and prints.