Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cleanup(list_of_strings):
- if " " in list_of_strings:
- list_of_strings.remove(" ")
- return " ".join(list_of_strings)
- print(cleanup(["cat", "er", "pillar"]))
- print(cleanup(["cat", " ", "er", "", "pillar"]))
- print(cleanup(["", " ", ""]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement