Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def list_no_start_and_end(list_of_things: list) -> list:
- """
- Remove first and last element of a list and return the new list.
- ["cat", "dog", "human"] -> ["dog"]
- :param list_of_things: list
- :return: List without first and last element
- """
- del list_of_things[-1], list_of_things[0]
- return list_of_things
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement