You can try this in one line :
with open("file.txt") as f:
print([i.strip().split(',') for i in f])
2
solved How do you read a textfile into an array python
You can try this in one line :
with open("file.txt") as f:
print([i.strip().split(',') for i in f])
2
solved How do you read a textfile into an array python