with open(sys.argv[1], 'rU') as f:
    toks = list(tokenize.generate_tokens(f.readline))
for i in range(len(toks) - 1):
    tok = toks[i]
tok2 = toks[i + 1]
if tok[0] == token.STRING and tok[0] == tok2[0]:
    print('implicit concatenation in line {} between {} and {}'.format(tok[
        2][0], tok[1], tok2[1]))
Identifying implicit string literal concatenation