Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#Code created using this documentation: https://docs.python.org/3/library/tokenize.html
from tokenizer import tokenize, TOK
token = ["chicken","bacon"] #Added example foods, to test if tokenizer works.
food = input("Enter ingredient ")
for token in tokenize(food):
print(u"{0}: '{1}' {2}".format(
TOK.descr[token.kind],
token.txt or "-",
token.val or ""))