摘要:
>>>'abc' + 'def''abcdef'Python分别为'abc'和'def'分配了空间,当进行连接操作时,Python自动为新的字符串'abcdef'分配了空间>>>s = 'abc'>>>s = s + 'def'>>>s'abcdef'上面的例子中,看上去我们把'abc'赋给了s,然... 阅读全文
摘要:
while i < len(myString): print 'character %d is:'%myString[i]length = len(myString)while i < length: print 'character %d is:'%myString[i]for oth... 阅读全文
摘要:
#!/usr/bin/env python#--*-- coding:utf-8 --*--"""标识符合法性检查,首先要以字母或者下划线开始,后面要跟字母,下划线或者数字这个例子只检查长度大于等于2的标志符"""import stringalphas = string.letters + '_'n... 阅读全文
摘要:
1. first of all, you need to download the right version of rar for mac os x. the download url:www.rarlab.com2.it is really a pity that the rar is jus... 阅读全文