input()函數1.等待輸入;2.將輸入的內容賦值給了等於號前面的變數;3.input返回的數據類型是str。 ...
input()函數
1.等待輸入;
2.將輸入的內容賦值給了等於號前面的變數;
3.input返回的數據類型是str。
1 name = input('your name:') 2 print('welcom {0}'.format(name), type(name)) 3 4 執行結果 5 your name:lipandeng 6 welcom lipandeng <class 'str'>