例子:
import random
c = list(zip(a, b))
random.shuffle(c)
a[:], b[:] = zip(*c)
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/
Python之两个列表一起打乱
阅读 76
2022-07-18
例子:
import random
c = list(zip(a, b))
random.shuffle(c)
a[:], b[:] = zip(*c)
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/
相关推荐
精彩评论(0)