python入門第二天

變量的輸入和輸出 Print 可以輸出多個參數 Print(‘hello world’,end=’’) def print(self, *args, sep=' ', end='\n', file=None):   input     類型轉換     import random # 輸入猜拳 player = int(input('請輸入:剪刀(0) 石頭(1) 布(2):')) # 隨機產生0
相關文章
相關標籤/搜索