Lets suppose I have a list like this:
mylist = [\"a\",\"b\",\"c\",\"d\"]
To get the values printed along with their index I can use Python\
Or, if you don't insist on using a list comprehension:
>>> mylist = ["a","b","c","d"] >>> list(enumerate(mylist)) [(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd')]