2015年4月15日

Python 文件的IO

摘要: 对文件的操作#coding=utf-8#!user/bin/pythonimport os#基本操作和写入文件fo = open("test2.py",'wb')print fo.nameprint fo.__sizeof__();print fo.modefo.write("print 20")f... 阅读全文

posted @ 2015-04-15 17:46 手撕高达的村长 阅读(261) 评论(0) 推荐(0) 编辑

Python 函数的使用 外加引入文件

摘要: #coding=utf-8#!user/bin/pythonimport sysimport test2def functionsss(name,sex,age=25): print name print sex print age returnfunctionsss('... 阅读全文

posted @ 2015-04-15 17:20 手撕高达的村长 阅读(218) 评论(0) 推荐(0) 编辑

Python 时间函数

摘要: 时间的运用#coding=utf-8#!user/bin/pythonimport timeimport calendarticks = time.asctime(time.localtime())print ticksprint '-------------------------------'p... 阅读全文

posted @ 2015-04-15 17:07 手撕高达的村长 阅读(148) 评论(0) 推荐(0) 编辑

Python 运算符

摘要: Python语言支持以下类型的运算符:算术运算符比较(关系)运算符赋值运算符逻辑运算符位运算符成员运算符身份运算符运算符优先级Python算术运算符以下假设变量a为10,变量b为20:运算符描述实例+加 - 两个对象相加a + b 输出结果 30-减 - 得到负数或是一个数减去另一个数a - b 输... 阅读全文

posted @ 2015-04-15 16:10 手撕高达的村长 阅读(253) 评论(0) 推荐(0) 编辑

Python 变量类型

摘要: 首先是赋值,各种类型#coding=utf-8#!user/bin/pythonimport sysstring = '你好'integer = 1000floater = 1.00print integerprint floatersys.stdout.write(string + '\n')Py... 阅读全文

posted @ 2015-04-15 15:52 手撕高达的村长 阅读(239) 评论(0) 推荐(0) 编辑

Python的基本配置

摘要: Python是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本语言。Python的设计具有很强的可读性,相比其他语言经常使用英文关键字,其他语言的一些标点符号,它具有比其他语言更有特色语法结构。Python 是一种解释型语言:这意味着开发过程中没有了编译这个环节。类似于PHP和Perl语言。... 阅读全文

posted @ 2015-04-15 14:05 手撕高达的村长 阅读(268) 评论(0) 推荐(0) 编辑

导航