ExamGecko
Question list
Search
Search

Question 37 - 200-901 discussion

Report
Export

Refer to the exhibit.

A REST API returns this JSON output for a GET HTTP request, which has been assigned to a variable called “vegetables”. Using Python, which output is the result of this command?

print(filter(lambda 1: 1[‘type’] == ‘fruit’, vegetables) [0][‘items’][0][‘items’][0])

A.

{‘color’: ‘green’, ‘items’: [‘kiwi’, ‘grape’]}

Answers
A.

{‘color’: ‘green’, ‘items’: [‘kiwi’, ‘grape’]}

B.

[‘kiwi’, ‘grape’]

Answers
B.

[‘kiwi’, ‘grape’]

C.

lettuce

Answers
C.

lettuce

D.

kiwi

Answers
D.

kiwi

Suggested answer: D
asked 07/10/2024
Fathy Refay
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first