how to end code when user say exit in python code example Example: how to exit program in python import sys sys.exit() //This will exit the python program