Python 初次接触 (1)
1、安装好python
写第一条语句:
print 'hello world'
' ' 和 " " 一样的,都可以输出
2、pip install numpy
3、尝试输出
(x,y,z) = (1,2,"hello")
print "x=%d" % x
print "y=%d" % y
print "z=",z
4、列表List
classmates = ['Java','Ruby','Python'];
print classmates[1]
print len(classmates)
print classmates
classmates.insert(1,"C#")
print classmates
classmates.append("JavaScript")
print classmates
classmates.pop(2)
print classmates
classmates.pop()
print classmates
classmates[1] = "Ruby"
print classmates