Tried to convert to Python 3, having some errors
Removed [ and ] from tokens