Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lfuncs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ def find_endswith_in_list(suffix, list1):
"""
return list(filter(lambda e: e.endswith(suffix), list1))

def find_endswith_in_list_2(suffix, list1):
"""Filters the given list so that only elements that
end with the provided suffix will be returned.
"""
return list(filter(lambda e: e.endswith(suffix), list1))

def split_lists(olist, prefix):
"""Splits a list into two lists and returns them as a tuple.
The first list will contain all elements in the original list
Expand Down