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
8.1k 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
8.4k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.