if len(user_hash) > 0: with open(log_file, \"w\") as log_f: for name in user_hash: log_f.write(\"Name:%s \\n Email: %s\" % (name, email) else l
Your log_f.write statement is also missing a trailing ')', which is likely confusing the parser...and the indentation doesn't look right. Cut and paste problem?