I have a coding problem that I can not solve. I've tried several suggested things, but none works:
# -*- coding: utf-8 -*- import sys line = ["Oi tudo bem com você","eu GOSTO de café", "esta situação é Terrível"] def suppressions(line): #coding = sys.stdout.encoding #line_coding = line mails = ' '.join(line) mails = ' '.join(mails.lower().strip(' ').split()) #tirar os espaços multiplos #mails = ' '.join(line.encode(coding)) return mails print suppressions(line)
['Hi, fine with you, I like caf \ xc3 \ xa9 this situation \ xc3 \ xa7 \ xc3 \ xa3o \ xc3 \ xa9 terr \ xc3 \ xadvel']
Hi, how are you?
I like coffee
This is a terrible situation.
I know that if I take the accents (or use python 3) it does, but unfortunately I can not do either of these things.