a = input("输入第一个数:")b = input("输入第二个数:")if a > b: print(b, a)else: print(a, b)这是基于字符串的,可以吗亲
inputA = raw_input("请输入第一个数字/按下 enter 键退出:")inputB = raw_input("请输入第二个数字/按下 enter 键退出:")if inputA > inputB:print "从大到小排序:", inputA,inputB else:print "从大到小排序:",inputB,inputA ...
#除此之外print支持格式化输出,和C的差不多%d ,%s等 >>> print ' this is %d , it means "%s" in that' %(1,'get that') #这是格式化输出 this is 1 , it means "get that" in that >>> #print还支持将输出结果输入到标准输出流中 >>> log = open('log.txt','w+') >>> print >>l...