Ask coding questions

← Back to all posts
How to terminate connection without a message from replit popping up in python

so im trying to make something thats like a conversation with a computer and he asks if your going to leave twice if you answer yes the first time he will let you leave but it will still ask again and if you answer yes that time the program just ends because there is no more code to execute
and if you answer no he terminates the connection and I want to show a connection that time because it adds to the effect
I forget to mention Im using the exit function from system so yeah, i just need to know how to make it not show a message in the console saying that it unexpectedly disconected


on line 4 of the post i meant to say message instead of connection