随笔分类 -  Python

摘要:从实例学习Python1、运行python文件时传递参数。在控制台运行命令:pythontest.py200320012000这里传递了四个参数,通过sys.argv可以获得所有参数,2、将字符串转换为整数Python3.x:locale.atoi(str)Python3.x:string.atoi(str);3、获取最大整数Python3.x:sys.maxsizePython2.x:maxint4、Python3.x取消了Long数据类型,全部使用int类型Python2.x:int类型转换为long数据类型:long(int)5、Python3.x的print输出方式:如果不需要换行:则 阅读全文
posted @ 2013-09-09 17:57 Blue Blue 阅读(255) 评论(0) 推荐(0)