for item in search_result_diction["photos"]["photo"]: sample_photo_ids =item["id"] print sample_photo_ids
Hello! This a really easy question, but I just can't seem to figure out how to accomplish it. For the above code( just part of it is shown) the below output is produced.
The output is correct but I would like the values from variable sample_photo_ids to be stored in a list. Any advice on how to accomplish this? I tried creating a list and appending sample_photo_ids to that list but it just produced NONE as the values.