To fix the IndexError caused by an empty line being entered, I added a while loop in main.py to check if the action variable is an empty string. If it is, I prompted the user to enter what they wanted to do again. Now entering an empty string will not throw an error causing the program to crash, it will just prompt the user.
To fix the IndexError caused by an empty line being entered, I added a while loop in main.py to check if the action variable is an empty string. If it is, I prompted the user to enter what they wanted to do again. Now entering an empty string will not throw an error causing the program to crash, it will just prompt the user.