Apr-21-2018, 06:22 PM
I'm trying to get this to work inside a def, it works fine if I get rid of def main(): but when I do it this way no go.
I know I need to declare sAnalyze as something, but what? Any help? Thanks in advance!
I know I need to declare sAnalyze as something, but what? Any help? Thanks in advance!
from textblob import TextBlob from textblob import Word import csv sAnalyze = tuple def main(): sAnalyze = TextBlob("You did a good job, thumbs up") #sAnalyze.sentiment() print("Polarity" + str(sAnalyze.polarity) + "SubJectivity" + str(sAnalyze.subjectivity)) main()