python控制结构有:for循环, while循环, if条件语句,下面我们直接上代码. 一.for循环 a = range(5) for x in a : print(x) 0 1 2 3 4二.while循环 a = [1, 2, 3, 4, 5] print(a) while len(a) > 0 : a.pop(); print(a) [1, 2, 3, 4, 5] [1, 2, 3, 4] [1, 2, 3] [1, 2] [1] []三.if条件语句 a = ' b = 1 if…