I read a file in python, which contains in each line 2 integer numbers and 1 real. How can i find in python the number of unique number from the 2 first integer number from all the file (except real)?
eg file
1 2 3.3
11 22 33.3
111 222 333.3
11 22 33.3
114 224 334.4
In this example, the result should be 8.
UPDATE this is my code
with open('test.txt','r') as f:
for line in f:
for word in line.split():
print(word)
How can I determine not to consider the real number and after i can do count distinct number from the first two integer in each line