Login and get codingIn this Bite we collected some random tweets and populated a list of namedtuples of text and a polarity rating which we got using
TextBlob
, an awesome module that makes it easy to do sentiment analysis (we used it for our PCC07):blob = TextBlob(tweet) polarity = blob.sentiment.polarityA polarity of < 0 indicates a negative sentiment, > 0 a positive one.
In this Bite we practice list comprehensions and sorting. Complete the two functions below following their docstrings. Enjoy and keep calm and code in Python!
Will you be the 174th person to crack this Bite?
Resolution time: ~30 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 2.67 on a 1-10 difficulty scale.
» You can do it! 😌