Skip to content

条件语句if

if x == 3
	print('x等于3')
elif x == 4
	print('x等于4')
else
	print('x不等于3也不等于4')

循环

for

 for i in range(5)
 	print(i)
	
// 0,1,2,3,4

while

num = 5
while True:
	print(num)
	num = num + 1
	if num > 10:
		continue