Given two lists:
chars = [\'ab\', \'bc\', \'ca\'] words = [\'abc\', \'bca\', \'dac\', \'dbc\', \'cba\']
how can you use list comprehensions to
This works, using index:
index
[words[chars.index(char)] for char in chars if char in words[chars.index(char)]]
Am I missing something?