Convierte de un número o números a un grupo de caracteres y viceversa
Project description
LibrerÃa Python / Secuenciador alfanumérico
Importar librerÃa
PyPI pip install Secuenciador-alfanumerico
# Todos
from ConvertDicc import *
Devolver diccionario predeterminado
from ConvertDicc import DiccionarioPreder
# Llamar librerÃa predeterminada
print(DiccionarioPredeter("AZ"))
# ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
Convertir secuencia numérica a una alfabética
from ConvertDicc import NumDiccionario
# Convertir numérico en lista caracteres
Diccionario = ["A", "B", "C"] # Array
Devolver = [0, 4] # Devolver del 1 al 5
Grupo = 5 # Devolver con 5 caracteres
print(NumDiccionario(Diccionario, Devolver, Grupo))
# ['AAAAA', 'AAAAB', 'AAAAC', 'AAABA', 'AAABB']
Convertir secuencia alfabética a una numérica
from ConvertDicc import DiccionarioNum
# Convertir lista a numérico
Diccionario = ["A", "B", "C"] # Diccionario de elementos
Resolver = ['AAAAA', 'AAAAC', 'AACAB'] # Elementos para resolver
print(DiccionarioNum(Diccionario, Resolver))
# [0, 2, 19]
Partes
Diccionario
Puedes llamar a un Diccionario predefinido o declararlo tú.
Declarar diccionario no definido: En vez de poner el identificador habria que inglesar un array ["a", "b", "c"]
Diccionarios predefinidos:
"01" - ["0", "1"]
"09" - ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
"AZ" - ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"AñZ" - ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"az" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"añz" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"AZaz" - Diccionario = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"AñZañz" - ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"azAZ" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"añzAñZ" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"0Z" - ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"0ñZ" - ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
"0z" - ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"0ñz" - ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
"A0" - ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
"Añ0" - ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
"a0" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
"añ0" - ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Devolver
Es el conjunto de valores el cual se va a convertir.
[0, 4] - Devolver del 1 al 5
[4] - Devolver 4
Grupo
Cantidad mÃnima de caracteres del grupo. Si no se define se devolverá la máxima a la que llegue.
5 - AAABA
1 - BA
Sin definir - BA
Resolver
Valores de los cuales se quiere saber la posición.
['AAAAA', 'AAAAC', 'AACAB'] - [1, 3, 19]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file SecuenciaAlfanumerica-2022.5.8.tar.gz.
File metadata
- Download URL: SecuenciaAlfanumerica-2022.5.8.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79709d098d0a0f791b9df5fa784bf8ee780001a3e713861e43a93c009f9d2f37
|
|
| MD5 |
7fc686baa01efc409551b1e7e67aa4c5
|
|
| BLAKE2b-256 |
87a681f1ccb3143eb0226dc269b12bacb3750b41b50cad095268778a259734c6
|