Created
October 5, 2012 20:45
-
-
Save hudsonsferreira/3842279 to your computer and use it in GitHub Desktop.
Coisas importantes Yakindu Parser
This file contains hidden or 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
| >>> questions = ['name', 'quest', 'favorite color'] | |
| >>> answers = ['lancelot', 'the holy grail', 'blue'] | |
| >>> for q, a in zip(questions, answers): | |
| ... print 'What is your {0}? It is {1}.'.format(q, a) | |
| ... | |
| What is your name? It is lancelot. | |
| What is your quest? It is the holy grail. | |
| What is your favorite color? It is blue. | |
| for tag in tags: | |
| for cont in content: | |
| for tupla in cont: | |
| if tag in tupla: | |
| print tupla | |
| ....: | |
| ('initial_state', 'light', 'off') | |
| ('initial_state', 'cooling', 'power', 'normal') | |
| ('initial_state', 'light', 'on', 'turned', 'light', 'off') | |
| ('initial_state', 'cooling', 'power', 'returns', 'normal') | |
| ('state', 'cooling', 'power', 'minimum') | |
| ('final_state', 'light', 'on') | |
| ('transition', 'opens', 'refrigerator', 'door') | |
| ('transition', 'changes') | |
| ('transition', 'closes', 'refrigerator', 'door') | |
| ('end', 'automatically') | |
| ('end', 'turned') | |
| ('end', 'simultaneously', 'system') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment