例:

import sys
while True:

print("Type exit to exit.")
res = input("请输入:")
if res == "exit":
    sys.exit()
print("You type " + res +'.')