随笔分类 - python
摘要:1 >>> a=520 2 >>> type(a) 3 4 >>> a='520' 5 >>> type(a) 6 7 >>> a=5.2 8 >>> type(a) 9 10 >>> a=True 11 >>> type(a) 12 1 >>> a=True 2 >>> type(a) 3 4 >>> isinstance(a,bool) 5 Tr...
阅读全文
摘要:1 >>> name='萧峰' 2 >>> print(name) 3 萧峰 4 >>> name="独孤求败" 5 >>> print(name) 6 独孤求败 7 >>> 1 >>> p='C:\Users\lenovo\Desktop\python' 2 SyntaxError: (unicode error) 'unicodeescape' codec can't deco...
阅读全文
摘要:1 Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 2 Type "copyright", "credits" or "license()" for more
阅读全文
摘要:1 import random 2 luckyNum=random.randint(2,9) 3 i=1 4 while i<=3: 5 guessNum=input("请你猜猜我的幸运号码:") 6 guessNnmToInt=int(guessNum) 7 if luckyNum==guessN
阅读全文

浙公网安备 33010602011771号