Read the file and make a list should to it.
with open('media.txt') as f: lst = [i.strip() for i in f]So now have list and
a(0)
would in this case be lst[0]
.>>> lst ['1234L4', '2345L4', '3456L5', '6384L6'] >>> lst[0] '1234L4' >>> lst[2] '3456L5'