I'm pretty sure this is a really fundamental concept in Python, I'd love it if someone could help me understand how to do the following in a pythonic/clean way. I'm really new to coding so I will just show an example. I think it will be obvious what I am trying to do.
for textLine in textLines:
foo = re.match('[1-100]', thing)
if foo:
list = db.GqlQuery("SELECT * FROM Bar").fetch(100)
if thing == '1':
item = list[0]
elif thing == '2':
item = list[1]
elif thing == '3':
item = list[2]
.
.
.
elif thing == '100':
item = list[99]
Thanks for the help!