其实这一章也就是介绍了if,elif,else,while,break,continue,for,range()函数,import,from import,sys.exit()(提前结束程序)
贴一下sys.exit()的程序吧
Author:Alisita
import sys
while True:
print('Type exit to exit')
response = input()
if response == 'exit':
sys.exit()
print('You typed ' + response + '.')