Ibrahemqasim commited on
Commit
f15a0b5
·
verified ·
1 Parent(s): 2363599

Update nationalities.py

Browse files
Files changed (1) hide show
  1. nationalities.py +13 -1
nationalities.py CHANGED
@@ -15,7 +15,19 @@ nats_url = "https://raw.githubusercontent.com/MrIbrahem/Nationalities/refs/heads
15
  response = requests.get(nats_url)
16
  nationalities = response.json()
17
 
18
- data_list = nationalities["data"]
 
 
 
 
 
 
 
 
 
 
 
 
19
  # ---
20
  print("______________")
21
  print(f"len of nationalities : {len(data_list)}.")
 
15
  response = requests.get(nats_url)
16
  nationalities = response.json()
17
 
18
+ data_list = []
19
+ # ---
20
+ for x in nationalities["data"]:
21
+ data_list.append({
22
+ "nat_en": x["nat"],
23
+ "man": x["men"],
24
+ "men": x["mens"],
25
+ "women": x["women"],
26
+ "womens": x["womens"],
27
+
28
+ "country_en": x["en"],
29
+ "country_ar": x["ar"],
30
+ })
31
  # ---
32
  print("______________")
33
  print(f"len of nationalities : {len(data_list)}.")