Bandna Prasher Bandna Prasher - 1 year ago 94
Python Question

Textblob module in python is not working for me

Here is the code...

import textblob
While True:
print("Enter the text....")
text = input()
blob = textblob.TextBlob(text)
blob.translate(to = "de")

It ask for text and then tells me Nothing. Any help is appreciated!

Answer Source

Here's a working example:

import textblob

while True:
    text = input("Which text you want to translate:")
    blob = textblob.TextBlob(text)
    print("--> {0}".format(blob.translate(to = "de")))

You forgot to print the German translated string