A Python list is like an array in Ruby.
list.py
list = [0, 1, 2]
len(list) #Check the number of elements in the list, in this case 3
list.append(3) #Add an element to the end of the list, in this case a comma after 2 and a 3
list.pop(3) #Deletes the element with the specified number in the list, in this case 3 is deleted
By the way, csv files are also treated as a list separated by commas, so you can operate the list.
Recommended Posts