摘要:
a = "heaven" b = "hell" c = True and a or b print c d = False and a or b print d 输出: heaven hell 所以bool and a or b类比c中的bool?a:b,当bool条件为真时,结果是a;当bool条 阅读全文
摘要:
n=input("please enter a number:\n")for i in range(0,n):#打n行的意思 for j in range(0,(n-1-i)):#每行打这么多个空格 print'',#实验证明,print''+'3'与print'3'打出来是一样的,可以理解为''打 阅读全文