repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pep1=  {"Firstname": 'Kelly', "Lastname": "Jose", "Age-": 15, "City-": 'Winchester' } #first dictonary
pep2 = {"First_name": 'Ariana', "Last_name": "Pastor", "Age": 16, "City": 'Winchester'} #second diconary set up
pep3 = {"first_name": 'Devin', "last_name": "Arnold", "age": 16, "city": 'Winchester'} #thrid diconary set up
people = list()
for value in pep1.values(): 
  #goes through the first dictonary and adds values to people list 
  people.append(value)
for value in pep2.values(): 
  #goes through the 2nd dictonary and adds values to people list 
  people.append(value)
for value in pep3.values(): 
  #goes through the third dictonary and adds values to people list 
  people.append(value)
for val in people: 
  #goes through list and prints all the information 
  if val == 'Winchester': 
    print('City: ' + val + '\n')
  elif val == 15 or val ==16: 
    print('Age: ' + str(val) + '\n')
  else: 
    print(val + '\n')