Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- words = [str(item) for item in re.split("[,;:.!()\"\'\\\\/\[\] ]+", input())if item != ""]
- lower_case = []
- upper_case = []
- mixed_case = []
- for word in words:
- if re.compile("^[a-z]+$").match(word):
- lower_case.append(word)
- elif re.compile("^[A-Z]+$").match(word):
- upper_case.append(word)
- else:
- mixed_case.append(word)
- print("Lower-case: ", end="")
- print(", ".join(lower_case))
- print("Mixed-case: ", end="")
- print(", ".join(mixed_case))
- print("Upper-case: ", end="")
- print(", ".join(upper_case))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement