Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created April 8, 2018 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/6f838fd61075ea47e9bb813fc66aa523 to your computer and use it in GitHub Desktop.
Save Fhernd/6f838fd61075ea47e9bb813fc66aa523 to your computer and use it in GitHub Desktop.
Comprobación inicio de cadenas de caracteres con texto particular. OrtizOL.
nombre_archivo = "python-ejemplo.py"
print(nombre_archivo.endswith('.py'))
print(nombre_archivo.startswith('python'))
print('')
enlace = "https://www.python.org"
print(enlace.startswith('http'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment