Created
August 23, 2016 20:33
-
-
Save yorktronic/178c3ff07da7a8d108347357dfea2cd6 to your computer and use it in GitHub Desktop.
try except example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tweets_data_path = '../data/twitter_data.txt' | |
tweets_data = [] | |
tweets_file = open(tweets_data_path, "r") | |
for line in tweets_file: | |
try: | |
tweet = json.loads(line) | |
tweets_data.append(tweet) | |
except: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment