2020年10月13日

python2和python3区别

摘要: 参考链接地址:https://blog.csdn.net/samxx8/article/details/21535901 (感谢博主 可克 整理) 我目前用到的点: 改动 描述 是否用到 long()函数被抛弃 全部使用int(x)来做类型转换,long()函数不可用 用到 print 从pytho 阅读全文

posted @ 2020-10-13 12:09 awildfish 阅读(83) 评论(0) 推荐(0) 编辑

python: 类型转换(int,long,float->string)

摘要: # -*- coding: UTF-8 -*- import sys # 这个例子主要是了解python的字符串和int/long/float等类型的转换关系 # int string转int a = "123" print(int(a)) #字符串转换为int # 字符串无法转换为int a = 阅读全文

posted @ 2020-10-13 12:03 awildfish 阅读(6655) 评论(0) 推荐(0) 编辑

导航