Thanks, but I get errors in both :(
Please enter the callsign: A30 Traceback (most recent call last): File "stations.py", line 10, in
for row in stations:
ValueError: I/O operation on closed file.
Please enter the callsign: A30 Traceback (most recent call last): File "stations.py", line 5, in
My bad, I messed up the indentations.
Indent everything below:
stations = csv.reader(f)
and both examples should work.
This is great and makes sense...
now time to play with it ... progress!
print ("{0}".format(*row)+" is the callsign given to {1}".format(*row)+" which is in the {2}".format(*row)+" Area")
@BCarley started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
Thanks, but I get errors in both :(
Please enter the callsign: A30
Traceback (most recent call last):
File "stations.py", line 10, in
ValueError: I/O operation on closed file.
Please enter the callsign: A30
Traceback (most recent call last):
File "stations.py", line 5, in
ValueError: I/O operation on closed file.