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
一、幾個基本概念 登錄用戶(login user):通過登錄方式進入系統的用戶,強調登錄身份。 當前用戶(current user):執行一個進程或者命令時所使用的用戶身份,強調執行身份。 舉