edited:
to make simpler let imagine that I have card game that has 60 cards I want ti=o distribute this card for 6 players.
I want to card to be distributed 1 by 1 or 2 by 2 or 3 by 3 or 10 by 10
Code
import random
Indtester =0
Testword = []
while Indtester < 60:
item = random.randint(0,100)
Testword.append(str(item))
Indtester=Indtester+1
words=Testword
#---------------Ini variable befeore the build
limt =5
ind = 1
Comb1=[]
Comb2=[]
Comb3=[]
Comb4=[]
Comb5=[]
Comb6=[]
total =len(words)
PlayerHods = total/6
print("total ",total,"PlayerHods ",PlayerHods)
MaxRound =PlayerHods/limt
Round =1
#---------------Ini variable befeore the build
print("Sarting Buulid the combo lists")
print("The max rounds is ",MaxRound)
for line in words:
if ind <= limt :
word = line
word = word.replace("\n","")
lastwordcomb1 =word
lastindc1=ind
Comb1.append(word)
if ind > limt and ind <= limt*2:
word = line
word = word.replace("\n","")
lastwordcomb2 =word
lastindc2=ind
Comb2.append(word)
if ind > limt*2 and ind <= limt*3:
word = line
word = word.replace("\n","")
lastwordcomb3 =word
lastindc3=ind
Comb3.append(word)
if ind > limt*3 and ind <= limt*4:
word = line
word = word.replace("\n","")
lastwordcomb4 =word
lastindc4=ind
Comb4.append(word)
if ind > limt*4 and ind <= limt*5:
word = line
lastwordcomb5 =word
lastindc5=ind
word = word.replace("\n","")
Comb5.append(word)
if ind > limt*5 and ind <= limt*6 :
word = line
word = word.replace("\n","")
lastwordcomb6 =word
lastindc6=ind
Comb6.append(word)
ind =ind+1
if ind > limt*6:
word = line
word = word.replace("\n","")
lastwordcomb1 =word
lastindc1=ind
Comb1.append(word)
ind =1
Round=Round+1
print(Comb1)
print(Comb2)
print(Comb3)
print(Comb4)
print(Comb5)
print(Comb6)
print(len(Comb1),len(Comb2),len(Comb3),len(Comb4),len(Comb5),len(Comb6))
As you can see I have the 'Comb1' with 12 and I can see the 30 being part of the comb6 and also in the Comb1 ir should be only in Comb1 same with 60
Here is the result of my code:
Output
Uploading the file tolist
total 60 PlayerHods 10.0
Sarting Buulid the combo lists
The max rounds is 2.0
['1', '2', '3', '4', '5', '30', '31', '32', '33', '34', '35', '60']
['6', '7', '8', '9', '10', '36', '37', '38', '39', '40']
['11', '12', '13', '14', '15', '41', '42', '43', '44', '45']
['16', '17', '18', '19', '20', '46', '47', '48', '49', '50']
['21', '22', '23', '24', '25', '51', '52', '53', '54', '55']
['26', '27', '28', '29', '30', '56', '57', '58', '59', '60']
12 10 10 10 10 10