-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvoting_data.py
53 lines (30 loc) · 1.23 KB
/
voting_data.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
voting_data = []
voting_data.append({"county":"Arapahoe", "registered_voters": 422829})
voting_data.append({"county":"Denver", "registered_voters": 463353})
voting_data.append({"county":"Jefferson", "registered_voters": 432438})
voting_data.insert(1,{"county": "El Paso", "registered_voters":461149})
voting_data.pop(0)
voting_data.pop()
voting_data.insert(1,{'county': 'Jefferson', 'registered_voters': 432438})
voting_data.append({"county":"Arapahoe", "registered_voters": 422829})
#print(voting_data)
voting_data = [{"county":"Arapahoe", "registered_voters": 422829},
{"county":"Denver", "registered_voters": 463353},
{"county":"Jefferson", "registered_voters": 432438}]
# for county_dict in voting_data:
# print(county_dict)
# for i in range(len(voting_data)):
# print(voting_data)
# for i in range(len(voting_data)):
# print(voting_data[i])
#print Key and Values seperately
# for a in voting_data:
# for b in a.values():
# print(b)
#Printing Key, value and dict
# for county_dict in voting_data:
# print(county_dict['county'])
# for county_dict in voting_data:
# print(county_dict['registered_voters'])
# for county_dict in voting_data:
# print(county_dict)