-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
19 lines (16 loc) · 690 Bytes
/
Copy pathmain.py
File metadata and controls
19 lines (16 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from text_utils.cleaner import remove_extra_spaces
from text_utils.converter import to_uppercase, to_lowercase, reverse_text
from text_utils.counter import count_words, count_characters, count_lines
def run():
print("Welcome to Text Utils CLI")
sample = input("Enter text: ")
print("\n--- Results ---")
print("Cleaned: ", remove_extra_spaces(sample))
print("Uppercase: ", to_uppercase(sample))
print("Lowercase: ", to_lowercase(sample))
print("Reversed: ", reverse_text(sample))
print("Word count:", count_words(sample))
print("Char count:", count_characters(sample))
print("Line count:", count_lines(sample))
if __name__ == "__main__":
run()