Skip to content

Instantly share code, notes, and snippets.

@dansteeves68
Created April 15, 2013 11:12
Show Gist options
  • Save dansteeves68/5387371 to your computer and use it in GitHub Desktop.
Save dansteeves68/5387371 to your computer and use it in GitHub Desktop.
Create a printable lunch menu from latest Wedge format
text = open('lunch.txt', 'r')
foo = ''.join(text.readlines()).split('5.00\n')
lunches = []
for bar in foo:
baz = bar.split('\n')
(day, meal) = baz[2].split('\t')
lunches.append('%s - %s - %s - %s' % (day, baz[0], meal, baz[3].lstrip('Option: ')))
print '\n'.join(sorted(lunches))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment