I have a list of numbers like this(saved in .txt file):
list_of_numbers = [
('5', 2.5, 5200),
('6', 3.2, 5236),
('8', 5.4, 5287),
('6', 8.7, 2563)
]
And i imported this list (list is .txt file) like this:
list_of_numbers = open("list_of_numbers.txt").read().strip().split()
but now i want that python print me each second element in each line.. I tried this:
p = x[1] for x in list_of_numbers
print(p)
but it's not correct.. And i want that python printed me like this:
p = 2.5, 3.2, 5.4
Please help me..