how to exit python interpreter in terminal code example Example: exit python terminal Ctrl+d or exit()