everyone!
I have a simple txt file, with few number in a row (',' is separator)
"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21"
and this code:
num=[]
f = open('sample.txt','r')
for i in f:
num.append(i.split(',')
print(num)
my goal is to get list of items:
['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21']
but i get list i list with 1 item:
[['1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21']]
looking for help