Discover and read the best of Twitter Threads about #dictionaries

Most recents (2)

#Python Tip: If you're working with #lists or #dictionaries in Python, you'll want to know about list and dictionary comprehension. These tools can make your code more concise and readable, and they're easy to use once you get the hang of them! Here's a quick rundown:"
1/5: #List #comprehension is a way to create a new list in a single line of code. You can use it to transform or filter an existing list.
The syntax is
[expression for item in list if condition].
2/5: Here's an example: Suppose you have a list of numbers and you want to create a new list that contains the squares of the even numbers. You can use list comprehension like this:

numbers = [1, 2, 3, 4, 5]
squares = [num**2 for num in numbers if num % 2 == 0]
Read 6 tweets
Can computational methods assess the #sentiment of complex texts? In an article with my fabulous colleagues from the @WZB_Berlin, @unipotsdam @LMU_Muenchen @JungeAkademie, we answer this question by applying #dictionary and #scaling methods on a sample of #literature reviews๐Ÿงต
The article is also a practical #guide to help researchers select an appropriate #method and degree of preprocessing for their own data. Our #corpus consisted of 6.041 summaries of reviews of contemporary German #literature acquired from @perlentaucher00 (2/9)
The linguistic #complexity of #literature reviews differ from other texts with regard to their #language-- ambiguity, irony, metaphors, etc.-- are comparatively difficult to capture with #computational approaches. So how did our different methods fare? (3/9)
Read 9 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!