摘要:
#!/usr/bin/python# Filename: str_methods.py name = 'Swaroop' # This is a string object if name.startswith('Swa'): print 'Yes, the string starts with " 阅读全文
摘要:
# Filename: reference.py print 'Simple Assignment'shoplist = ['apple', 'mango', 'carrot', 'banana']mylist = shoplist # mylist is just another name poi 阅读全文
摘要:
# Filename: using_dict.py # 'ab' is short for 'a'ddress'b'ook ab={ 'Swaroop' : 'swaroopch@byteofpython.info', 'Larry' : 'larry@wall.org', 'Matsumoto' 阅读全文
摘要:
#/usr/bin/env puthon (1)起始行(只有咋UNIX环境下使用,用来直接通过文件名来执行文件) “”“this is a test module” (2)模块文档(文档字符串) import sys import os (3)模块导入 debug=Ture (4)全局变量 clas 阅读全文