Created
October 29, 2015 19:57
-
-
Save felipecruz/57f480e90921798e7f47 to your computer and use it in GitHub Desktop.
livropython
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
>>> impostos = ['MEI', 'Simples'] | |
>>> for imposto in impostos: | |
... if imposto.startswith('S'): | |
... print(imposto) | |
... | |
Simples | |
>>> impostos = ['MEI', 'Simples'] | |
>>> for imposto in impostos: | |
... print(imposto.startswith('S')) | |
... | |
False | |
True | |
>>> impostos = ['MEI', 'Simples'] | |
>>> for imposto in impostos: | |
... if imposto.startswith('S'): | |
... print('{} inicia com {}'.format(imposto, 'S')) | |
... else: | |
... print('{} nao inicia com {}'.format(imposto, 'S')) | |
... | |
MEI nao inicia com S | |
Simples inicia com S |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment