Python 內建函數
把數字 3.5 轉換為整數:
x = int(3.14)
運行實例
int() 函數把指定值轉換為整數。
int(value, base)
把字符串轉換為整數:
x = int("15")