Horje
how to translate to string to different alphabet python Code Example
how to translate to string to different alphabet python
string = 'some string'

normal_alphabet = 'abcdefghijklmnopqrstuvwxyz.'
my_alphabet = 'ijklmnopqrstuvwxyz.abcdefgh'

translation = string.maketrans(normal_alphabet, my_alphabet)

print(string.translate(translation))
turn characters to alpgabetic numper python
text = input()

def encrypt(t):
    chars = list(text)
    allowed_characters = list(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.?!")

    for char in chars:
        for i in allowed_characters:
            if char == i:
                chars[chars.index(char)] = allowed_characters.index(i)
    return chars

print(encrypt(text))




Python

Related
select certain element from ndarray python Code Example select certain element from ndarray python Code Example
add ML Code Example add ML Code Example
how to connect an ml model to a web application Code Example how to connect an ml model to a web application Code Example
python class name Code Example python class name Code Example
print statements Code Example print statements Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9