码迷,mamicode.com
首页 > 其他好文 > 详细

类型转换

时间:2019-02-01 21:52:23      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:nbsp   byte   one   bytes   for   bsp   int   list   转换   

int("123")   123

int("3f",16)  63

bytes([72,9,64])  b‘H\t@‘

list("abc")   [‘a‘, ‘b‘, ‘c‘]

set(["one","two"])  {‘one‘,‘two‘}

[int(x) for x in (‘1‘,‘29‘,‘-3‘)]   [1,29,-3]

类型转换

标签:nbsp   byte   one   bytes   for   bsp   int   list   转换   

原文地址:https://www.cnblogs.com/find1/p/10347042.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!