python怎么把字符串類型轉(zhuǎn)換為數(shù)字?
整數(shù)字符串轉(zhuǎn)換為對(duì)應(yīng)的整數(shù)int('12')小數(shù)字符串轉(zhuǎn)換為對(duì)應(yīng)小數(shù)float('12.34')數(shù)字轉(zhuǎn)換為字符串str(123.45)ASCII碼轉(zhuǎn)換為相應(yīng)字符chr(97)字符轉(zhuǎn)換為響應(yīng)ASCII碼ord('a')
python怎么把字符串類型轉(zhuǎn)換為數(shù)字?
整數(shù)字符串轉(zhuǎn)換為對(duì)應(yīng)的整數(shù)int('12')小數(shù)字符串轉(zhuǎn)換為對(duì)應(yīng)小數(shù)float('12.34')數(shù)字轉(zhuǎn)換為字符串str(123.45)ASCII碼轉(zhuǎn)換為相應(yīng)字符chr(97)字符轉(zhuǎn)換為響應(yīng)ASCII碼ord('a')