Just a quick question:
What does a comma in the following statement does:
print "Average = %s" % (avg,)
It seems I just can’t find the relevant documentation.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It makes the argument list into a tuple. Without the trailing comma a single value in parentheses is just that value in parentheses.