python有多種從控制檯輸入方式:
使用input()、raw_input()函數
這兩個函數在python的內置庫裏。
input()函數返回一個數值(整型或浮點型)
raw_input()函數返回字符串
用例:
value = input('input a int:')
print value
hello = raw_input('input a string:')
print hello
- 1
- 2
- 3
- 4
- 1
- 2
- 3
- 4
python有多種從控制檯輸入方式:
使用input()、raw_input()函數
這兩個函數在python的內置庫裏。
input()函數返回一個數值(整型或浮點型)
raw_input()函數返回字符串
用例:
value = input('input a int:')
print value
hello = raw_input('input a string:')
print hello
一、文件屬性 下文中,“文件”一詞默認代指廣義的數據類型,跟“目錄”等詞對比使用時,則專指普通文件(File)這一特定數據類型。 Linux系統中,我們可以使用命令“ls -al”來查看當前目錄
鍵盤改造 🥋 回憶上次內容 上次練習了複製粘貼 按鍵 作用 <kb