if statement - Else Syntax Error Python -
if len(user_hash) > 0: open(log_file, "w") log_f: name in user_hash: log_f.write("name:%s \n email: %s" % (name, email) else len(user_hash) < 0: print "nothing happened :(" i keep getting syntax error on else statement , unsure why keeps producing error. don't have other else statements in same def , still gives error. do?
your log_f.write statement missing trailing ')', confusing parser...and indentation doesn't right. cut , paste problem?
Comments
Post a Comment