python

python 自学笔记记录

#encoding utf-8
list1=[1,2,3,4,5]
tuple1=(1,2,3,4,5)
dic1={"name":"张三","age":"18"} #字典
col={"a","b","c"}
#for  i in range(1000): # 对序列进行遍历
#    print("hello world ",i) 
#for i in list1:
#    print(i)
#for i in tuple1:
#    print(i)
#for i in dic1: # 取键值
#    print(i)
#for i in col:
#    print(i)

# 求和
#sum =0
#for i in range(1,101):
#    sum=sum+i
#print(sum)

# 求取数组的最大值
a=[1,2,3,4]
maxx=a[0]
for i  in range (0,len(a)-1):
    if(maxx         maxx=a[i+1]
print(maxx)
 

你可能感兴趣的:(python,大数据)