Remove u202a from Python string

后端 未结 6 845
一整个雨季
一整个雨季 2020-12-11 10:07

I\'m trying to open a file in Python, but I got an error, and in the beginning of the string I got a /u202a character... Does anyone know how to remove it?

6条回答
  •  星月不相逢
    2020-12-11 10:36

    try strip(),

    def carregar_uml(arquivo, variaveis):
        cadastro_uml = {}
        id_uml = 0
    
        for i in open(arquivo):
            linha = i.split(",")
    
    
    carregar_uml("‪H:\\7 - Script\\teste.csv", variaveis)
    
    carregar_uml = carregar_uml.strip("\u202a")
    

提交回复
热议问题