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 len(user_hash) < 0:
print "Nothing happened :("
Run Code Online (Sandbox Code Playgroud)
我一直在else语句中遇到语法错误,我不确定为什么它会一直产生这个错误.我在同一个def中没有任何其他语句,但仍然会出错.我该怎么办?