[Solved] How to short python for loop, from insert structure to flat structure? [closed]


Your code does the same than:

items = [item['pk'] for item in json.loads(json_result)]

This is called a list comprehension.

solved How to short python for loop, from insert structure to flat structure? [closed]