使用 quit(), exit(), 或者Ctrl-D退出命令行
[root@centos 7.2 ~]# python
Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>> exit()
[root@centos 7.2 ~]#