python相关
规范:
https://blog.csdn.net/ratsniper/article/details/78954852
https://www.jianshu.com/p/e132bea1d2c9
笔记:
#coding:utf-8
stus = ['zhangsan','lisi','wangwu']
stus2 = ('zhangsan','lisi','wangwu')
# for i in enumerate(stus2):
# print(i)
# print( type(i) )
enumerate,遍历集合,并显示序号
len,查看长度
type,查看类型
id,查看内存地址
chr,查看asc码对应值
del,删除变量
max,最大值
min,最小值
a = [1,2]
b = a
b+= [3,4]
print(b)
print(a)
print('*' * 30)
a = [1,2]
b = a
b= b + [3,4]
print(b)
print(a)
b+=b != b = b + [3,4]
两个不相等,b的右边是表达式,则得到一个新的列表
2019.9.10
1.list将元组,字典(得到的是键),set转为list
stu = (1,2,3)
print(list(stu))
2.可以分割字符串
word = 'hello'
name = list(word)
print(name)