input 方法

1. input() 從鍵盤輸入資料。語法:

變數 = input(["提示字串"]) #將使用者輸入的資料存放在變數中。提示字串可有可無

2. 輸入完畢以按 Enter 來表示

3. input() 所輸入的資料是字串。若欲做數值運算需先轉換型態。