0

how do I make the result below print on a single line instead of down the column? Thanks.

i = 3
while not i<=0:
    i-=1
    print(i)

expected: 2 1 0

Wasif
  • 14,755
  • 3
  • 14
  • 34
KevinW
  • 21
  • 4

1 Answers1

1
i = 3
while not i<=0:
    i-=1
    print(i, end = ' ')

OUTPUT :

2 1 0