Loading...
Loading...
Loading...
A JSON list holds order objects with id and amount. Print the ids of the orders with amount above 500, in the same order as the list, separated by spaces. Print none when there is no such order.
id and numeric amount.none.Example
Input
[{"id":1,"amount":250},{"id":2,"amount":900},{"id":3,"amount":501}]Output
2 3
Orders 2 and 3 are above 500.
Try the problem first. Open one hint at a time.
Parse the line, then build a list of ids with a condition.
Join the ids as text with " ".join(...); remember str(id).
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor