I need to read tuples from a txt. I tried with numpy (using genfromtxt) but it didn't work (or at least, I don't know how). This is is my txt:
(0,0) (0,0) (1,0) (2,3)
(1,0) (1,1) (1,1) (3,3)
(2,0) (1,2) (2,1) (4,4)
(3,0) (2,2) (3,1) (5,5)
I want to read one by one this columns and get a list of tuples: Trying with numpy I have this:
import numpy as np
File = np.genfromtxt('file.txt',delimiter=' ', dtype= tuple)
But it returns a list of lists with bytes type elements.
Obviously I can change the way the data is stored in the txt. I just need to get a list of tuples (or a list of lists) from a txt.