Skip to content

Instantly share code, notes, and snippets.

@hudsonsferreira
Created October 5, 2012 20:45
Show Gist options
  • Select an option

  • Save hudsonsferreira/3842279 to your computer and use it in GitHub Desktop.

Select an option

Save hudsonsferreira/3842279 to your computer and use it in GitHub Desktop.
Coisas importantes Yakindu Parser
>>> 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