Hey everyone, I'm fairly new to python and have hit a brick wall in a program I'm writing. I need to read in a text file containing values (No problems here) the text file looks like this

10, .25, .26
12, .44, .34
4, .22, .56

The numbers 10, 12, and 4 are supposed to be index numbers where those are used to print 1-10, 1-12, and 1-4. I'm stuck on trying to use these values in the text file.

Anything at all would be helpful!

You can look at this,for taking out values.

l = []
for i in open('your.txt'):
    l.append(i[0:2])
    
print l
l1 = l[0]
print l1

'''Out-->
['10', '12', '4,']
10
'''
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.