Created on 2013-8-22
@author: hbjava1985
'''
print 'hello world!'
print "hello world!"
print 'hello %s!' % ('world')
a = 1; b = 2
if(a == b) :
print 'a == b'
elif (a > b) :
print 'a > b'
elif (a < b) :
print 'a < b'
else :
print '#@)#$'
array = [1, 2, 3, 4]
total = 0
for a in array:
total += a
print total
while 1 > 2:
pass
print set([1, 2, 3, 4, 4])
set1 = set([1, 2, 3, 4, 5])
set2 = set([2, 3, 4, 5, 6])
print set1 - set2
print set1 & set2
print set1 | set2
dict = {}
dict['zs'] = 21
dict['ls'] = 25
dict['ww'] = 22
for key in dict.keys():
print '%s %d' % (key, dict[key])
def main():
pass
if __name__ == '__main__':
main()
f = file("c:/client_log.txt","r")
print f.read()
f.close()
with open("c:/client_log.txt","r") as f:
print f.read()
with open("c:/yy.txt","w") as f:
f.write("i'am OK!")
'''
分享到:
相关推荐
Python3.73(hello world版)Python初学者
第一个Python程序,hello world!
hellopython的代码,python基础教程之HelloWorld! Python命令⾏ 假设你已经安装好了Python, 那么在Linux命令⾏输⼊: 代码如下: $python 将直接进⼊python。然后在命令⾏提⽰符>>>后⾯输⼊: 代码如下: >>>print('Hello...
笔者用的是win版的VScode1.0和32位Python2.7,安装Python时注意将Python添加到系统环境变量 二、VScode项目结构简介 VScode使用的是文件夹命名的项目,也就是说你想写程序的话,需要新建一个文件夹作为你的项目,这...
hello wolrd program of python script language.
open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world
Python打印hello world 程序详解;Python打印hello world程序是最简单的一个学习程序了;这里先演示python3的使用;再贴出python2的使用代码,可以对比二者的区别
1、LINUX环境下或是WINDOWS环境下。 2、PYTHON版本2.6.6。 3、运行命令:python hello-world.py python入门脚本,输出hello world,开启PYTHON之门,每个人都会经过这一步。!
本文实例讲述了Python编程入门之Hello World的三种实现方式。分享给大家供大家参考,具体如下: 第一种方式: $python >>>print('hello world') 屏幕上输出hello world print是一个常用函数 第二种方式: 复制...
简单的‘Hello World!’ Python命令行 假设你已经安装好了Python, ...(在Python 2.x中,print还可以是一个关键字,可写成print ‘Hello World!’,但这在3.x中行不通 )写一段小程序 另一个使用Python的方法,是写一
python基础训练题-Python打印hello world 程序详解-python2的使用-python3的使用
hello world of python 3
helloworld_python helloworld_python
Python命令行 假设你已经安装好了Python, 那么...(在Python 2.x中,print还可以是一个关键字,可写成print ‘Hello World!’,但这在3.x中行不通 ) 写一段小程序 另一个使用Python的方法,是写一个Python程序。用文本
python hello world
你好,世界用C,Java和Python编写的HelloWorld程序。 该存储库包含使用C,Java和Python编写的HelloWorld程序。 这些实际上仅用于检查已安装的开发环境的功能。
打印hello world,如何通过python语言实现打印hello world功能
Django Apache mod_pythion 的安装和相关环境的配置 。