You definitely should use dictionaries here. No need of elif
What if you have very long list with very many options? This is the way to do:
l1 = ['number', '3', 'number', '45', 'animal', 'rat',
'animal', 'tiger', 'color', 'red', 'color', 'orange']
d = {} # create an empty dictionary that will hold all the values for you
for key, value in zip(l1[::2],l1[1::2]):
if d.get(key) is None:
d[key] = [] #If the key is missing, then initialize it with an empty list
d[key].append(value) #append the values
print(d)
{'number': ['3', '45'], 'animal': ['rat', 'tiger'], 'color': ['red', 'orange']}
if you need exactly like your output, just do:
print(d['number'])
['3', '45']
d['animal']
['rat', 'tiger']
d['color']
['red', 'orange']