Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- def loadGrid(file):
- with open("C: Users Desktop file.txt") as file:
- grid = []
- for gridLines in csv.reader(file):
- # The rstrip method gets rid of the "n" at the end of each line
- grid.append(gridLines.rstrip().split("[]"))
- loadGrid(file)
Add Comment
Please, Sign In to add comment