Using a for loop to print

https://www.codecademy.com/courses/learn-python/lessons/loops/exercises/for-your-a?action=resume_content_item

why is it that in this case the printed is in a horizontal line? is it because it is a string and not alist, thathas been frequently the case in previous examples?

The comma at the end of the print statement causes this.

β€œThe , character after our print statement means that our next print statement keeps printing on the same line.”

1 Like