vs code與w3schools截圖 for i in range(9,19): print("陳則希hex十六進",hex(i)) print("bin二進位",bin(9)) print(any([True,False,True])) print(-1 2,3>2] print("all全為真",all(x)) print("any有一真",any(x)) print("列印,迴圈for,range範圍") for i in range(40000,40005): print("字碼",i,"是",chr(i)) y = 0 for a in range(10,99,5): y = y+1 print("第幾", y, "次") print(a) #前面縮排同一個區塊 w3school內建函數列表 Function Description abs() Returns the absolute value of a number all() Returns True if all items in an iterable object are true any() Returns True if any item in an iterable object is true ascii() Returns a readable version of an object. Replaces none-ascii characters with escape character bin() Returns the binary version of a number bool() Returns the boolean value of the specified object bytearray() Returns an array of bytes bytes() Returns a bytes object callable() Returns True if the specified object is callable, otherwise Fals...
留言