for s in list will produce the items of the list and not their indexes. So s will be 'abc' for the first loop, and then
'def'. 'abc' could only be a key to a dict, not a list index.
In the line with t fetching the item by index is redundant in python.