this post was submitted on 15 Jun 2025
14 points (100.0% liked)
LibreByte
190 readers
22 users here now
Tecnologías libres para la comunidad.
Puedes enviar post a esta Comunidad sobre Tecnologías Libres en Español o Inglés.
founded 8 months ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
For anyone curious but not wanting to read the article :
The python fastest ways of the base article are mainly using a for loop and using regex (first one is faster on small string, regex becomes faster around 25 characters).
For loop :
Regex :
There are updates to the article, suggesting faster ways. First one uses the find() function, second one swaps the strings of the For Loop method :