Taking Output and Storing it in a list


#1

 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.

33119881551
32433652893
33091881772
33248116255
32433478723
32433458873
33248054025
32865004100
33206363876
33119518551
33119511671
33247891385
33247881545
33206275196

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.


#2

How did you implement your solution with the list? Can you provide that?