Challenge: Retrieving Information from Nested List
Opgave
Swipe to start coding
You've been provided with the list people, which includes sub-lists detailing the names and ages of five individuals, as shown below:
| Name | Age |
|---|---|
| Alex | 23 |
| Noah | 34 |
| Peter | 29 |
| John | 41 |
| Michelle | 35 |
To extract specific information using indexing, follow these steps:
- Store the full information of the 4th person in the list in the variable
fourth_person. - Store the first person's name in the list in the variable
first_name. - Store the age of the fifth person in the list in the variable
fifth_age. - Use indexing to solve this task.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 5
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 1.67
Challenge: Retrieving Information from Nested List
Stryg for at vise menuen
Opgave
Swipe to start coding
You've been provided with the list people, which includes sub-lists detailing the names and ages of five individuals, as shown below:
| Name | Age |
|---|---|
| Alex | 23 |
| Noah | 34 |
| Peter | 29 |
| John | 41 |
| Michelle | 35 |
To extract specific information using indexing, follow these steps:
- Store the full information of the 4th person in the list in the variable
fourth_person. - Store the first person's name in the list in the variable
first_name. - Store the age of the fifth person in the list in the variable
fifth_age. - Use indexing to solve this task.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 5
single