python类型转换 int, str, list, long, tuple

1 int(x [, base ])           #转换整数
2 long(x [, base])           #转换成长整数  
3 str(x)                     #转换成字符串  
4 repr(x)                    #转换成表达式字符串  
5 tuple(x)                   #转换成元组  
6 list(x)                    #转换成列表  
7 chr(x)                     #转换成字符       

to be continued...

posted @ 2013-10-25 00:55  大漠小雨  阅读(3315)  评论(0编辑  收藏  举报