-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (20 loc) · 909 Bytes
/
Copy pathmain.py
File metadata and controls
26 lines (20 loc) · 909 Bytes
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
import random
#for loop in python
#range_list = [num*2 for num in range(0,5)]
#print(range_list)
#names1 = ["Alex", "Beana", "Pedri", "Aitanna", "Vinicius", "Ronaldo", "Hansi", "Dybala"]
#short_names = [name for name in names1 if len(name)<6]
#caps_names = [name.upper() for name in names1 if len(name)>6]
#print(short_names)
#print(caps_names)
#with open("names1.txt") as n1:
# names1 = [name for name in n1]
#with open("names2.txt") as n2:
# names2 = [name for name in n2]
#sames_names = [name for name in names1 if name in names2]
#print(sames_names)
names = ["Lewandoski", "Raphinha", "Lamine", "Pedri", "Frenkie", "Bernal", "Gavi", "Casado", "Cubarsi", "Araujo", "Eric", "kounde", "Balde", "Christensen"]
player_scores = {name:random.randint(1,100) for name in names}
print(player_scores)
good_players = {player for (player, score) in player_scores.items() if score > 60}
print(good_players)