Source Code:
(back to article)
library = { 'book1': {'title': 'The Great Gatsby', 'author': 'F. Scott Fitzgerald', 'year': 1925}, 'book2': {'title': 'To Kill a Mockingbird', 'author': 'Harper Lee', 'year': 1960}, 'book3': {'title': '1984', 'author': 'George Orwell', 'year': 1949 } print(library['book1']['title']) # Returns 'The Great Gatsby' print(library['book2']['author']) # Returns 'Harper Lee' print(library['book3']['year']) # Returns 1949
Result:
Report an issue