I have been learning python for a few days now and needed something to put my mind into, I was searching for a way to create a map using turtle and came across this code on my computer I created a file.txt with the following coordinates:
river, 5
-400, 400
-333, 400
300, 500
sand, 5
555, -200
600, 554
334, 432
4332, 43
This function does not work can someone help me conquer this
river, 5
-400, 400
-333, 400
300, 500
sand, 5
555, -200
600, 554
334, 432
4332, 43
Code:
import csv
block=[]
f=open("file.txt", "r")
csv_reader=csv.reader(f)
for row in csv_reader:
block.append(tuple(row))
Comment