-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClass_P2.py
63 lines (38 loc) · 1000 Bytes
/
Class_P2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import random
class human:
count=0
all=list()
def __init__(self,name,number):
self.name=name
self.number=number
human.count+=1
self.all.append(self.name)
class football_player(human):
def retun_all(self):
return human.all
a=input('esme bazikonan ra vared konid ')
b=a.split('-')
#print(b)
d=list()
for i in range(1,99): #shomare pirhane bazikona
if len(d)<22: #22 ta bazinon darim
d.append(i)
#print(d)
for i in b: #add players as an object
n=d.pop()
qq=football_player(i,n)
X=qq.retun_all()
#print(len(X))
#print(qq.retun_all())
#print(human.count)
TEAM_A=[]
for i in range(1,12):
qwe=random.choice(X)
TEAM_A.append(qwe)
X.remove(qwe)
print('TEAM_A= ',TEAM_A)
print(len(TEAM_A))
TEAM_B=X
#print(len(qq.retun_all))
print("TEAM B= ",TEAM_B)
print(len(TEAM_B))