“Wymień numer Python String” Kod odpowiedzi

Wymień numer Python String

    x = re.sub(r"\d+", "NUMB", str(x))       #Replaces digits with 'NUMB'
Troubled Tern

Ciąg Python Zastąp litery na liczby

from string import ascii_letters

code = code = "1111702460830000Lu05"
code = "".join([str(ascii_letters.index(c)) if c in ascii_letters else c for c in code])
print(code)
The_BLUESTEEL

Odpowiedzi podobne do “Wymień numer Python String”

Pytania podobne do “Wymień numer Python String”

Więcej pokrewnych odpowiedzi na “Wymień numer Python String” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu