Created
April 11, 2018 13:05
-
-
Save Fhernd/bd9c87a08410554ea84fe4c960f119b0 to your computer and use it in GitHub Desktop.
Coincidencia y búsqueda de texto. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
frase = "Python es un lenguaje de programación interpretado." | |
print(frase.find('grama')) | |
cadena_fecha = '11/04/2017' | |
if re.match(r'\d+\d+/\d+', cadena_fecha): | |
print('Coincide') | |
else: | |
print('No coincide') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment