- 1
Is there any better way of doing it?Also, how do I make it so that it takes all the numbers are shown upto 1?
5 ответов
+ 5
This is similar
https://code.sololearn.com/c0LnmG6R9uI3
+ 5
This is just a short form for
if j:
end=" "
else:
end="\n"
Since False is equivalent to zero and True to anything else, the else branch is only entered if j=0.
Otherwise the first branch is entered.
You only want line brakes if j becomes 0.
+ 1
Thanks! Exactly what I was looking for!
+ 1
That explains it! Thanks a ton! Matthias
0
I don't get the if else statement in the end tho...