Im trying to access a variable in a list that is 3 places earlier in the list. For example list_1[dogs, cats, pigs, hamsters, kids]. If Im trying to access the word cats based on the position of kids how would I do that? I know list_1[4] returns kids and I want to be able to return cats without using list_1[1]. I tried making list_1[4] = a and then doing print list_1[a - 3] but i get a syntax error since I cant subtract an int from a string. Anyone think they can help me out? Thanks

Is this what you are looking for?

list_1 = ['dogs', 'cats', 'pigs', 'hamsters', 'kids']
pos = list_1.index('kids')
print list_1[pos-3]