中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python3 input() 函數(shù)

Python3 內(nèi)置函數(shù) Python3 內(nèi)置函數(shù)

Python3.x 中 input() 函數(shù)接受一個標準輸入數(shù)據(jù),返回為 string 類型。

注意:在 Python3.x 中 raw_input() 和 input() 進行了整合,去除了 raw_input( ),僅保留了input( )函數(shù),其接收任意任性輸入,將所有輸入默認為字符串處理,并返回字符串類型。

函數(shù)語法

input([prompt])

參數(shù)說明:

  • prompt: 提示信息

實例

input() 需要輸入 python 表達式

>>>a = input("input:") input:123 # 輸入整數(shù) >>> type(a) <class 'str'> # 字符串 >>> a = input("input:") input:json # 正確,字符串表達式 >>> type(a) <class 'str'> # 字符串

更多內(nèi)容

Python2.x input 與 raw_input() 說明

Python2.x 和 Python3.x 中 raw_input( ) 和 input( ) 區(qū)別

Python3 內(nèi)置函數(shù) Python3 內(nèi)置函數(shù)

其他擴展