Nest list doesn't become integer (Python)
A = [] B = [] C = [] D = [] E = [] F = [] data = [A, B, C, D, E, F] bus = ['bus A', 'bus B', 'bus C', 'bus D', 'bus E', 'bus F'] dataType = input('Do you want to use the default data (d) or enter your own? (o)') if dataType == 'o': for i in range(6): print('Please enter the punctuality of ' + bus[i] + ' and separate them with a space') punctuality = input(int()) punctuality = punctuality.split(' ') data[i].append(punctuality) print(data) Hi so im having an issue with this and im really confused as to why the output for print data comes out as a string something like this [['2'], ['2 2 2 2 2'], ['2 2 2 2 2'], ['2 2 2 2 2'], ['2 2 2 2 2'], ['2 2 2 2 2 2']] even though i specifically set the input to integer. This causes problems further down: for i in range(6): for j in data[i]: if j < 0: lateData[i].append(j) print('The number of late arrivals for ' + bus[i] + ' is', len(lateData[i]) TypeError: '<' not supported between instances of 'str' and 'int' any help would be greatly appreciated, thanks!