Connection Interfaces and Cables連接接口和電纜 << 
Previous Next >> HW3
HW2

from random import shuffle
list = [40523138, 40523148, 40723217, 40728238, 40823148, 40823152, 40923201, 40923202, 40923203, 40923204, 40923205, 40923206, 40923207, 40923208, 40923209, 40923210, 40923211, 40923212, 40923213, 40923214, 40923216, 40923217, 40923218, 40923219, 40923220, 40923221, 40923223, 40923224, 40923225, 40923226, 40923227, 40923228, 40923229, 40923230, 40923231, 40923232, 40923233, 40923234, 40923235, 40923236, 40923237, 40923238, 40923239, 40923240, 40923241, 40923242, 40923243, 40923244, 40923245, 40923246, 40923247, 40923248, 40923249, 40923250, 40923251, 40923252, 40923253]
shuffle(list)
n = 5
m = int(len(list)/n)
list2 = []
for i in range(0, len(list),m):
 list2.append(list[i:i+m])
print(list2)
from random import shuffle  隨機排序列表
n = 5   分5組
int是整數 len是列表
Connection Interfaces and Cables連接接口和電纜 << 
Previous Next >> HW3