Nested Lists 1 (Lists)
Use slices from the following list of lists that contains information about characters in Harry Potter to answer the questions below. Each sublist contains the last name, first name (if the character has two names) and occupation of a single character. Paste the list into your code to get started.
harry_potter_characters = [['Potter', 'Harry', 'Student'], ['Dobby',
'House Elf'], ['Granger', 'Hermione', 'Student'], ['Hagrid', 'Rubeus',
'Keeper of Keys and Grounds']]
Print the following lines with the the appropriate answers inserted into the blanks by taking slices from the list:
- Harry ______ is a ______ at Hogwarts.
- The Keeper of Keys and Grounds at Hogarts is ______ ______ who is typically refered to only by his last name.
- The entire entry in the table for Hagrid is _________________. [i.e., print out the sublist for Hagrid]
- Dobby is a ______.
- ______ Granger has a time-turner, which would be really useful for completing this homework.