[{'name': 'name', 'age': 1, 'kind': 'n'}, {'name': 'value', 'age': value, 'kind': 'value'}, {'name': 'value', 'age': value, 'kind': 'value'}]
The list is stored in this way, but I don't know how to set the conditional statement to output the index of the list with the dictionary's age value of 5 or more
list dictionary python
[i for i, d in enumerate(L) if d['age'] > 5]
© 2024 OneMinuteCode. All rights reserved.