内置函数for、while循环控制

                                内置函数(len,in,not in)
#len计算长度,可以是元组、列表,字典等
a = 'hello,world'
res = len(a)
print(res)
11
 
#in:在....里面,not in:不在....里面(输出结果为布尔形式)
keys、values
info = {
     'name':'aaa',
     'age': '18',
'hight':'188'
}
print('12' not in info.values())
True
引用计数和垃圾回收机制
当一个程序执行完毕后,回收变量所占用的内存
当引用计数变为0时,回收变量所占用的内存
 
 
 
 
 
 

posted @ 2020-05-10 15:50  乄Keyboardman丶  阅读(152)  评论(0编辑  收藏  举报