Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- countrow = 0
- with open('mysheet.csv', newline='') as csvfile:
- thesheet = csv.reader(csvfile, delimiter=' ', quotechar='|')
- for row in thesheet:
- for mystring in row:
- shred = mystring.split(",")
- for x in range(0,8):
- matrix[countrow][x] = shred[x]
- countrow = countrow + 1
- countrow = 0
- with open('mysheet.csv', newline='') as csvfile:
- thesheet = csv.reader(csvfile, delimiter=' ', quotechar='|')
- thelength = sum(1 for row in thesheet) + 1
- dudes = 9
- matrix = [[0 for x in range(dudes)] for y in range(thelength)]
- for row in thesheet:
- for mystring in row:
- shred = mystring.split(",")
- for x in range(0,8):
- matrix[countrow][x] = shred[x]
- countrow = countrow + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement