0
I’m having codage problem that I can’t solve. I’ve tried several suggested things but none works:
Script:
# -*- 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)
output:
['hi all right with voc xc3 xaa i like Caf xc3 xa9 this situ xc3 xa7 xc3 xa3o xc3 xa9 Terr xc3 xadvel']
desired output:
hi all right with you
i like coffee
this situation is terrible
I know if I take out the accents (or use python 3) it solves, but unfortunately I can’t do either of those two things.
Didn’t work :(
– pitanga
You are using Linux or Windows?
– Carlos H Marques