2008年12月29日
摘要: Python学习笔记(3)1)Statements and SyntaxHash mark (#)表示Python注释NEWLINE(/n)是标准行操作符Backslash(/)表示一行继续Semicolon(;)在同一行连接两个语句Colon(:)从suite中分隔首行Suites通过缩进进行限制Python文件以模块进行组织2)Variable Assignment等号(=)是赋值操作符>>> anInt = -12>>> String = 'cart'>>> aFloat = -3.1415*(5.0**2)>& 阅读全文
posted @ 2008-12-29 21:25 YangJin 阅读(199) 评论(0) 推荐(0)
摘要: python学习笔记(1)1)** 表示“冥”2)输入函数 raw_input()3)字符串操作:>>> pystr='python'>>> iscool='is cool!'>>> pystr[0]'p'>>> pystr[2:5]'tho'>>> iscool[:2]'is'>>> iscool[3:]'cool!'>>> iscool[-1]'!'> 阅读全文
posted @ 2008-12-29 21:20 YangJin 阅读(210) 评论(0) 推荐(0)