girishtulabandu / One_line_PythonPrograms

9 stars 69 forks source link

Added code to search in list and return indices #107

Closed sawzedong closed 3 years ago

sawzedong commented 3 years ago

Overview Returns all indices of a value (search) within a list (lst), returned in the form of a list Returns an empty list if the value is not found within the list

Sample Input: lst = [1, 4, 8, 10, 4] and search = 4 Output: [1, 4]