Last active
September 22, 2015 19:20
-
-
Save raphapassini/c19112b576da055c2b08 to your computer and use it in GitHub Desktop.
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
ladroes = set(['lula', 'dilma', 'pt']) | |
tempo = set(['clima', 'tempo', 'temperatura']) | |
pets = set(['gato', 'cachorro', 'papagaio']) | |
frase = 'eu gosto do clima' | |
frase_set = set(frase.split()) | |
for s in [ladroes, tempo, pets]: | |
if s & frase_set: | |
print 'Encontrei a string que procurava' | |
print 'SET: {}'.format(s) | |
print 'FRASE: {}'.format(frase) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment