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

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.

主站蜘蛛池模板: 利辛县| 托克逊县| 读书| 红河县| 柘荣县| 宁津县| 莎车县| 托克逊县| 五峰| 江西省| 枣阳市| 上思县| 循化| 泽库县| 敦化市| 惠东县| 苏州市| 都昌县| 嘉善县| 隆化县| 汽车| 孟村| 八宿县| 绵竹市| 海丰县| 富阳市| 绥中县| 巩留县| 普定县| 集安市| 河间市| 汶川县| 仁寿县| 峡江县| 密山市| 托里县| 旌德县| 陆川县| 西乌| 梁山县| 始兴县|