Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why it keeps saying that is not defined?

+1 vote
asked Apr 3, 2019 by Stefan

'''#dictionary inside a dictionary'''
print ()
print ('dictionary inside a dictionary')
print ()
data = {
    'pigelid': {'name': 'Stefan', 'age': 25, 'place': 'Galati'},
    'aurasid': {'name': 'Auras', 'age': 12, 'place': 'Craiova'},
    'tigicid': {'name': 'Iulian', 'age': 33, 'place': 'Bucuresti'}
    }

print (data[aurasid])

What is wrong in here?

1 Answer

0 votes
answered Apr 3, 2019 by Frankje

(Assuming this is a Python question)

Try

print (data['aurasid'])

instead (with quotation marks), and you get

{'name': 'Auras', 'age': 12, 'place': 'Craiova'}

as an output.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...