标签:
1 #coding=utf-8 2 #print函数 3 print 3, -1, 3.14159, -2.8 4 #type函数 5 print type(3), type(3.14159), type("123") 6 #类型转换 7 print int(3.14159), int(-2.8) 8 print float(3), float(-1) 9 #输出字符串 10 print "span" + "and" + "eggs" 11 str1 = "teacher" 12 str2 = "student" 13 print "I‘m a %s, not a %s"%(str1, str2) 14 s = "123" 15 print type(s) == str 16 #次方 17 print 3 ** 3 18 print 81 ** 0.5
标签:
原文地址:http://www.cnblogs.com/wanderingzj/p/5244451.html