same_values() takes two lists of numbers. The function should return a list where the values were equal in lst1 and lst2.
In same_values_equal_lists.py the lists of numbers that it takes as parameter must be of equal size. The function same_values() returns a list of the INDEXES (not the values themselves) where the values were equal in lst1 and lst2. The function same_values_numbers() returns the values that matched, not the indexes.
- Do a function that can take lists of unequal length.
- Use list comprehension
- Python 3
NA - It's only coding examples, there's no setup.
Project is: finished (technically) - but may come back and do the TO-DOs at some point.
Based on Codecademy's Learn Python 3 course, Code Challenges exercises
These may come in handy:
https://discuss.codecademy.com/t/how-could-i-use-list-comprehension-to-solve-this/458265