Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- from functools import *
- import json
- with open("tweets.json", "r") as tweet_db:
- tweets = json.load(tweet_db)
- # TODO: implement assigned functions
- def flatten(xs):
- return list(reduce(lambda res, x: res + (flatten(x) if isinstance(x, list) else [x]), xs, []))
- #def difference(xs, ys)
- #def to_text(tweets)
- #def to_lowercase(tweets)
- #def nonempty(tweets)
- #def total_word_count(tweets)
- #def hashtags(tweet)
- #def mentions(tweet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement