Even though these examples are with ints, not strings, the precedence is
the same.

Go back to your code. Read your code. Does it look closer to this:

8 + 2 % 5

or this?

(8 + 2) % 5


Can you solve this problem now?

Yes Steven, according to your precedence example now i can:

MESSAGE = ( "From: %s\n" + "To: %s\n" + "Subject: %s\n\n%s\n" ) % ( FROM, TO, SUBJECT, MESSAGE )
                        MESSAGE = MESSAGE.encode('utf-8')



it just need the whole concatenation thing in parenthesis so to be executed first but now:


                        # send the mail
                        server.sendmail( [ MESSAGE ] )

or

                        # send the mail
                        server.sendmail( MESSAGE )

both fail.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to