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

  • Learn Python in 7 Days
  • Mohit Bhaskar N. Das
  • 62字
  • 2021-07-09 20:40:25

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.

主站蜘蛛池模板: 边坝县| 抚顺市| 水富县| 西畴县| 兴城市| 海阳市| 明光市| 大悟县| 弥勒县| 鹤峰县| 云浮市| 马尔康县| 曲沃县| 奇台县| 蒙阴县| 宕昌县| 武清区| 宜良县| 成武县| 荆州市| 平潭县| 抚松县| 自治县| 乐亭县| 阳泉市| 望都县| 城口县| 广水市| 彩票| 新乡市| 镇平县| 夹江县| 旌德县| 迭部县| 若尔盖县| 石渠县| 霍林郭勒市| 循化| 德江县| 施甸县| 精河县|