Still better to just have "shared_status = tweet.get('retweeted_status', {}).get('text', '')" and then you can say "if shared_status: message = 'RT ' + message" or something. Testing a dict before pulling a value from a dict is really bad form in python.
Still better to just have "shared_status = tweet.get( 'retweeted_ status' , {}).get('text', '')" and then you can say "if shared_status: message = 'RT ' + message" or something. Testing a dict before pulling a value from a dict is really bad form in python.