i have a text file which is set out like:
a 1 1
b 1 1
c 1 1
d 1 1
e 1 1
f 1 1
and i was hoping to out put it like ["a", "1", "1"] etc however it currently outputs as
[a 1 1\n]
[b 1 1\n]
[c 1 1\n]
[d 1 1\n]
[e 1 1\n]
[f 1 1\n]
my code is
import csv
tname = input("player 1 enter your team name ")
x = "./" + tname + ".txt"
with open (x, "r") as r:
reader = csv.reader(r)
for row in r:
spec = [row]
print (spec)