List vs generator comprehension speed with join function

So I got these examples from the official documentation. https://docs.python.org/2/library/timeit.html What exactly makes the first example (generator expression) slower than the second (list comprehension)? >>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000) 0.8187260627746582 >>> timeit.timeit('"-".join([str(n) for n in range(100)])', number=10000) 0.7288308143615723 Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the … Read more

recursive iteration through nested json for specific key in python

I’m trying to pull nested values from a json file. I want to print out each of the values for every “id” key. I think I’m close but can’t figure out why the obj type changes from a dict to a list, and then why I’m unable to parse that list.
Here is a link to the json I’m working with: http://hastebin.com/ratevimixa.tex