Source Code:
(back to article)
# Verwendung von List Comprehension search_element = 3 print([i for i in my_list if i == search_element]) # Verwendung von filter result = list(filter(lambda x: x == search_element, my_list)) print(result)
Result:
Report an issue