Skip to content
repl process died unexpectedly
Profile icon
shlobb13

could someone help with this error msg? TIA

import sys

while True:
print('Type exit to exit.')
response = input()
if response == 'exit':
sys.exit()
print('You typed ' + response + '.')

You are viewing a single comment. View All
Profile icon
Bookie0

first of all that isnt an error message. It just says that because you told the repl to quit with sys.exit() which means the program exits. If you dont want this, since this is a while True statement, instead of sys.exit(), use break which will do the same.

Happy coding and hope this helps! =)