python开发_类型转换convert
发布时间:2020-12-17 00:18:50 所属栏目:Python 来源:网络整理
导读:在python的开发过程中,难免会遇到类型转换,这里给出常见的类型转换demo: 下面是我做的demo: ( ( ,int( ( ,int(234.23 ( ,int( ,16 ( ,int( ,10 ( ,int( ,8 ( ,int( ,2 ( ,int(23 ( ( ,float( ( ,float(32 ( ,complex(12,43 ( ,complex(12 ( ( ,str(232.3
在python的开发过程中,难免会遇到类型转换,这里给出常见的类型转换demo: 下面是我做的demo:
( (,int( (,int(234.23
(,int(,16 (,int(,10 (,int(,8 (,int(,2
(,int(23
( (,float( (,float(32
(,complex(12,43 (,complex(12
( (,str(232.33 (,str(32 lists = [,,,,, (,
strs =
(
(
(,chr(67 (,ord(
(,hex(12 (,oct(12))
Python 3.3.2 (v3.3.2:d047928ae3f6,May 16 2013,00:03:43) [MSC v.1600 32, >>> ================================ RESTART ================================
>>>10234,16) = 10,10) = 10,8) = 10,2) = 10230.0123.0132.0+虚部): (12+43j+虚部): (12+232.3332,,,,,,670xc>>>
======================================================== More reading,and english is important. I'm Hongten 大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。Hongten博客排名在100名以内。粉丝过千。Hongten出品,必是精品。 E | hongtenzone@foxmail.com ?B |? ======================================================== (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |