[Python] 120 / 1000 Capitalization should not change when the function is called, as this...

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

  1. Stack

    Stack Membro Participativo

    result = []
    index = 0

    while index < len(text):
    if text[index] in qq_slug.keys():
    result.append(qq_slug[text[index]])
    else:
    result.append(text[index])
    index += 1
    output = "".join(result)
    natiyje = output.lower().replace(" ", separator).split()[0][:max_length]

    return natiyje


    the main part of this code is actually a function called slugify that has several #parameters inside

    print(slugify("Úlken Háripler Saqlap Qalındı", lowercase=False))
    print(slugify('Jolbarıs penen Jolıǵıwlarım', separator="_"))


    when I call these, it's affecting other results too

    Continue reading...

Compartilhe esta Página