代码搜索:Python
找到约 10,000 项符合「Python」的源代码
代码结果 10,000
www.eeworm.com/read/435264/7794818
py 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'
www.eeworm.com/read/435264/7794819
py mymodule_demo.py
#!/usr/bin/env python
# Filename: mymodule_demo.py
import mymodule
mymodule.sayhi()
print 'Version', mymodule.version
www.eeworm.com/read/435264/7794824
py 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'
www.eeworm.com/read/435264/7794830
py continue.py
#!/usr/bin/env python
# Filename: continue.py
while True:
s=raw_input('Enter something : ')
if s=='quit':
break
if len(s)
www.eeworm.com/read/435264/7794837
py mymodule_demo2.py
#!/usr/bin/env python
# Filename: mymodule_demo2.py
from mymodule import sayhi,version
# Alternative:
# from mymodule import *
sayhi()
print 'Version',version
www.eeworm.com/read/435264/7794848
py func_default.py
#!/usr/bin/env python
# Filename: func_default.py
def say(message,times=1):
print message*times
say('Hello')
say('World',5)