Skip to content

如何对列表元素进行随机排序 #31

@Sogrey

Description

@Sogrey
a = [1,2,3,4,5,6,7, 8, 9,0 ]
random.shuffle(a)  ##调用python模块中现成方法
print(a)  ## [3, 0, 8, 1, 5, 7, 4, 6, 9, 2]

编写一个函数(不使用Python模块中的函数),打乱列表元祖的顺序 #30

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions