How to filter a big chunk of text which contains no line breaks in python?
Question: here is my problem : I want to filter a big chunk of text with python, but all
the things I found were filtering by line, ie with "if line.startswith", and I
don't think I could do that here :/.

Here is my actual code :

    
    
    import json
    import requests
    
    data = requests.get('http://www.reddit.com/r/todayilearned/new/.json');  
    print(data.json())
    

I want to fetch the content between ""title:":" and ",)". Do you have any
ideas ? Thanks !


Answer: Look at the output of `print(data.json())` The JSON Python module makes it
very easy to loop over JSON data with a for ... in ... loop. Try it out

    
    
    for x in data.json():
        print x
    

See what the output is. After that, add more inner loops to loop through x,
you will see how you can access each piece of JSON data.

