Print Functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Print Functions

The code: print(*range(1, int(input())+1), sep='') The problem: I know what the code does, but can anyone explain to why it does what is does, piece by piece? I know what "print(int(input))" means. As always, thank you in advance!

17th Mar 2020, 3:36 AM
deepspaceghost
deepspaceghost - avatar
1 Answer
0
If you don't mind a few follow ups: *range() removed the brackets. How? I'm assuming sep=" has something to do with how the ints are separated. Is this correct? Thanks again for the assist!
17th Mar 2020, 4:00 AM
deepspaceghost
deepspaceghost - avatar