Skip to content

Commit

Permalink
Merge pull request #4639 from pyramsd/reto#32
Browse files Browse the repository at this point in the history
Reto #32 - python
  • Loading branch information
kontroldev authored Aug 14, 2023
2 parents 3d2fb4c + fc3b7ab commit 2f8851c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Retos/Reto #32 - LA COLUMNA DE EXCEL [Media]/python/pyramsd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def excel_column(cadena: str) -> int:
cadena = cadena.upper()
col = 0

for i in cadena:
col = col * 26 + (ord(i) - ord("A") + 1)

return col


print(excel_column("z"))

0 comments on commit 2f8851c

Please sign in to comment.