摘要: 在python中,strings, tuples, 和numbers是不可更改的对象,而list,dict等则是可以修改的对象。 Python 的值传递,还是引用传递,查看下面的例子(引用传递,即传递地址): Python一定是引用传递的。 from ctypes import * import o 阅读全文
posted @ 2020-11-29 17:29 Alex0425 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 前提:Python的列表解析式 [expression for iter_var in iterable1 if condition] import random a=[random.randint(1,99) for i in range(10) if random.randint(1,99)<4 阅读全文
posted @ 2020-11-29 10:54 Alex0425 阅读(123) 评论(0) 推荐(0) 编辑