- #1
- 7,009
- 10,469
- TL;DR Summary
- I have a dictionary ' Birth' on birthdates: list of names and respective birthday pairs, e.g., 'Bob':'April1'
I can call a name in the list through Birth[name]. How do I call Birth[name]'s date?
--- Say we have the dictionary in Anaconda 2.7 Jupyter :---
B={'A1':'Jan1' , 'A2':'Feb2',...} of Birthdates.
---I can call a name , e.g., 'A1' , using Birth[name]. As in :---
print('What is your name '\? ')
name=input()
print('Yes, Birth[name] is in our list')
---How do I call a Date? I want to print out a given name's birthdate,---
---Something like :---
print(' A1's birthday is on ...')
B={'A1':'Jan1' , 'A2':'Feb2',...} of Birthdates.
---I can call a name , e.g., 'A1' , using Birth[name]. As in :---
print('What is your name '\? ')
name=input()
print('Yes, Birth[name] is in our list')
---How do I call a Date? I want to print out a given name's birthdate,---
---Something like :---
print(' A1's birthday is on ...')