Skip to content

Instantly share code, notes, and snippets.

@mentix02
Created April 8, 2022 16:03
Show Gist options
  • Save mentix02/0f753df1eaa1024e542be4e1f80f6fe8 to your computer and use it in GitHub Desktop.
Save mentix02/0f753df1eaa1024e542be4e1f80f6fe8 to your computer and use it in GitHub Desktop.
import csv
N = 8
data = []
with open("data.csv") as f:
table = csv.reader(f)
next(table)
for row in table:
data.append(list(map(int, row)))
def get_lines(row: int):
for i in range(N):
n = data[i][row - 1]
print(abs(n - 7))
get_lines(int(input("enter col: ")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment