Change tokens[0][0] == '.' -> tokens[0].startswith('.')