Answer the question
In order to leave comments, you need to log in
Why doesn't the split function return all values in a list?
I have a file with two lines. The first contains one number, and the second contains 5 numbers separated by a space. Here is the code:
file = open('standard input.txt', 'r')
n = int(file.readline())
t = str(file.readline())
t1 = t.split(' ')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question