代码搜索结果

找到约 11,834 项符合 Python 的代码

5.html

第五章 Python数据结构

7.html

第七章 输入输出

4.html

第四章 流程控制

setup.py

#!/usr/bin/env python from distutils.core import setup setup(name="pyDes", version="2.0.0", description="Pure python implementation of DES and TRIPLE DES encryption algorithm", aut

print_tuple.py

#!/usr/bin/env python # Filename: print_tuple.py age=22 name='Swaroop' print '%s is %d years old' %(name,age) print 'Why is %s playing with that python?' %name

break.py

#!/usr/bin/env python # Filename: break.py while True: s=raw_input('Enter something : ') if s=='quit': break print 'Length of the string is',len(s) print 'Done'

mymodule_demo.py

#!/usr/bin/env python # Filename: mymodule_demo.py import mymodule mymodule.sayhi() print 'Version', mymodule.version

function1.py

#!/usr/bin/env python # Filename: function1.py def sayHello(): print 'Hello World!' # block belonging to the function sayHello() # call the function

using_name.py

#!/usr/bin/env python # Filename: using_name.py if __name__=='__main__': print 'This program is being run by itself' else: print 'I am being imported from another module'

func_global.py

#!/usr/bin/env python # Filename: func_global.py def func(): global x print 'x is',x x=2 print 'Changed local x to',x x=50 func() print 'Value of x is',x