Skip to content

Commit 1c8eee0

Browse files
Update README.md
Generally revised
1 parent 7db80de commit 1c8eee0

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
# Python-Word-List-Manager
2-
This script manages a word list in word_list.txt, ensuring it's alphabetically sorted and free of duplicates. It reports duplicates found and total unique words at startup. Users can add new words interactively, with automatic sorting and duplicate prevention. If the .txt file doesn't exist, it's created automatically.
2+
This Python script manages a word list stored in a text file (word_list.txt). It ensures that the list is always sorted alphabetically and free of duplicates. Upon starting, the script checks for duplicate entries and sorts the list, reporting the number of duplicates found and the total number of unique words. Users can interactively add new words to the list, with the script preventing the addition of duplicate words and maintaining the alphabetical order. If the word list file does not exist, the script automatically creates it.
3+
4+
# Usage
5+
1. Preparation:
6+
- Ensure you have a file named `word_list.txt` in the same directory as the script.
7+
- If the file doesn't exist, the script will create it automatically.
8+
9+
2. Running the Script:
10+
- Execute the script `word_list.py`.
11+
- Upon starting, the script will:
12+
- Check for duplicate entries in `word_list.txt`.
13+
- Remove any duplicates and sort the remaining words alphabetically.
14+
- Display the number of duplicates found and the total number of unique words.
15+
16+
3. Adding Words:
17+
- The script will prompt you to enter new words. Type a word and press Enter.
18+
- If the word is already in the list, the script will notify you and prevent adding it again.
19+
- If the word is new, it will be added to the list, and the list will be automatically sorted alphabetically.
20+
21+
4. Exiting the Program:
22+
- Type `x` and press Enter to stop the program.
23+
24+
# Word List Format
25+
- Words in `word_list.txt` are listed one per line.
26+
- The list is always sorted alphabetically.
27+
- Duplicates are automatically removed from the list.

0 commit comments

Comments
 (0)