0

How do you make numbers in multiple lines into one line?

Imagine I have this, for i in range(10): print(i) output: 1 2 3 4 5 6 7 8 9 I dont want that, i want this -> 0123456789 how?? a simple solution please

9th Jul 2020, 1:33 PM
slawbear
slawbear - avatar
8 odpowiedzi
+ 6
print(i, end='')
9th Jul 2020, 1:35 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
cloroxide you just have to give one extra parameter to print function. for i in range(10): print(i, end='')
9th Jul 2020, 1:37 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
how to use list comprehension?
9th Jul 2020, 1:36 PM
slawbear
slawbear - avatar
0
kibo what does the * mean in your function?
9th Jul 2020, 1:38 PM
slawbear
slawbear - avatar
0
Hi Kibo! what do you mean by unpacking the list? Im sorry if im asking to much ^.^
9th Jul 2020, 1:42 PM
slawbear
slawbear - avatar