Check if item in a Python list is an int/number
问题 I have a Python script that reads in a .csv file and stores each of the values into a list of lists: list[x][y]. I don't have any issues with this. list = [] i = 0 for row in reader: list.append([]) list[i].append(row[0]) ... i += 1 I want to check one of these fields to see if it's an number (integer). When I perform a print type(list[i][0]) it returns a <type 'str'> even though the value is say 100. The if statements below are in a for loop iterating through the lists so what I was thinking