73.9k views
8 votes
Python problem: The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot:

User Astromax
by
4.5k points

1 Answer

2 votes

Answer:

for i in range(1,10): print("{}.".format(i))

Step-by-step explanation:

here's a one liner that does what you need.

User Ledgemonkey
by
4.5k points