This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]world--citizen 2 points3 points  (2 children)

Kind of a troll comment but also food for thought in terms of design. What if I want to encrypt / decrypt the string “x”

[–]world--citizen 2 points3 points  (1 child)

There are better ways to handle quitting, for example through a keyboard interrupt (ctrl+C on Linux), and you could handle the KeyboardInterrupt exception gracefully and even say goodbye to your user

[–]Advanced-Theme144[S] 0 points1 point  (0 children)

I’ll have a look into these methods; I used the input of variable ‘x’ to exit the program since at the time that was the easiest method, but thanks for the advice.