[Python] python Incorrect formatting Cyrillic

Discussão em 'Python' iniciado por Stack, Abril 20, 2025.

  1. Stack

    Stack Membro Participativo

    def inp(text):
    tmp = str()
    arr = ['.' for x in range(1, 40 - len(text))]
    tmp += text + ''.join(arr)
    print tmp

    s=['tester', 'om', 'sup', 'jope']
    sr=['тестер', 'ом', 'суп', 'жопа']
    for i in s:
    inp(i)
    for i in sr:
    inp(i)


    Output:

    tester.................................
    om.....................................
    sup....................................
    jope...................................

    тестер...........................
    ом...................................
    суп.................................
    жопа...............................


    Why is Python not properly handling Cyrillic? End of the line is not straight and scrappy. Using the formatting goes the same. How can this be corrected? thanks

    Continue reading...

Compartilhe esta Página