Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: Print statement not printing as it suppose to Date: Fri, 20 Sep 2013 22:40:00 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 25 Message-ID: References: <05bbf1a3-6480-48ee-8984-2482b90c79c0@googlegroups.com> NNTP-Posting-Host: panix1.panix.com X-Trace: reader1.panix.com 1379716800 19382 166.84.1.1 (20 Sep 2013 22:40:00 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Fri, 20 Sep 2013 22:40:00 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:54517 In <05bbf1a3-6480-48ee-8984-2482b90c79c0@googlegroups.com> Sam writes: > print("\nThe total amount required is ", total ) > OUTPUT > ('\nThe total amount required is ', 3534) In older versions of python (like the one you are using), 'print' is a statement instead of a function. In other words, it is used like this: name = "Bob" print "Hello ", name Because there are parentheses around the text to be printed, your version of python is interpreting it as a tuple. Remove the parentheses and you should be ok. -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"