官术网_书友最值得收藏!

Type conversions

It is easy to convert the data type of operands using a type conversion function. Let's understand with some examples:

In the preceding screenshot, 4.77 is converted into 4. In order to convert 4.77 into the int data type, the int() function is used. Likewise, if you want to convert into float, use the float() function.

主站蜘蛛池模板: 毕节市| 九江县| 营口市| 会泽县| 长海县| 肇庆市| 都安| 盘锦市| 榆树市| 潜山县| 龙江县| 和平县| 南江县| 个旧市| 禄丰县| 科技| 庆元县| 栖霞市| 淮北市| 容城县| 曲周县| 张家港市| 普陀区| 公主岭市| 馆陶县| 信丰县| 洛阳市| 朝阳市| 青龙| 改则县| 荣昌县| 原阳县| 平陆县| 类乌齐县| 南川市| 临海市| 阜新市| 康定县| 盖州市| 乐陵市| 凌源市|