Trying to make one of my very first programs. Tried to convert to int
, didn't work.
Getting this error:
list indices must be integers or slices, not tuple
stations = ['Schagen', 'Heerhugowaard', 'Alkmaar', 'Castricum', 'Zaandam', 'Amsterdam', 'Sloterdijk', 'Amsterdam Centraal', 'Amsterdam Amstel', 'Utrecht Centraal', '’s-Hertogenbosch', 'Eindhoven', 'Weert', 'Roermond', 'Sittard', 'Maastricht']
IndEind = stations.index(eindStation)
IndBegin = stations.index(beginStation)
intBegin = int(IndBegin)
intEind = int(IndEind)
print('stations[0]: ', stations[intBegin, intEind])