Nov-26-2020, 03:50 PM
Hi,
I want to read some numbers into my list and i want to insert them in 1 line:
1 2 3 4...
instead of:
1
2
3
4
When I read it in 1 line, it treats the numbers as a text, to change the format from text to number, I have to do it one by one. Is there any way to speed up the process and change the whole list into a number format?
I want to read some numbers into my list and i want to insert them in 1 line:
1 2 3 4...
instead of:
1
2
3
4
When I read it in 1 line, it treats the numbers as a text, to change the format from text to number, I have to do it one by one. Is there any way to speed up the process and change the whole list into a number format?
t.extend(input().split()) for i in range(n): t[i]=int(t[i])