a= 1
if a>10:
print 'a大于10'
print 'a小于10'
a = -20
if a > 10:
print ('a > 10')
elif a==0:
print 'a is 0'
else:
print 'a is fushu'
x = 10
while x >0:
print '22222'
x-=1
abc = 10
while abc > 0:
print ('abc = %s' % abc)
abc -= 1
a = dict(a=1,b=2,c=3)
print a
for i,j in a.items():
print (i,j)
x = ['a','b','c']
for k,v in enumerate(x):
print (k,v)
for i in range(1,11):
for k in range(1,i):
print k,
k +=1
i +=1
print "\n",
print (range(10))
print (xrange(10))
for x in xrange(10):
print (x)
for i in xrange(1,5):
print ('a='+str(i))
for i in xrange(11):
if i >= 3:
i+=1
print ('hello')
continue
if i == 4:
break
print ('i = %d' %i)
for num in range(10,20): # 迭代 10 到 20 之间的数字
for i in range(2,num): # 根据因子迭代
if num%i == 0: # 确定第一个因子
j=num/i # 计算第二个因子
print '%d 等于 %d * %d' % (num,i,j)
break # 跳出当前循环
else: # 循环的 else 部分
print num, '是一个质数'