Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27830

RE: help with simple print statement!

From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Subject RE: help with simple print statement!
Date 2012-08-24 19:59 +0000
References <CAFg9KJs4hPJ7zjydY45U8S6b5ndo2ox4qtYN6JWuwytt63z3hA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3774.1345838384.4697.python-list@python.org> (permalink)

Show all headers | View raw


Willem Krayenhoff
Any idea why print isn't working here?  

I tried restarting my Command prompt.  Also, print doesn't work inside a class.


-- 
Best Wishes,

     Bruce
     C: 604-441-5791
     My Availability 



Just as a note, this is a usenet group that can be accessed via email; a good portion of the people on the list does not receive attachments and images. HTML is also a bad format as it mangles code so please post in plain text and copy/paste from the command line instead of using screenshots.  It will be easy for us to run your code if necessary to reproduce the results.

Now on to your problem. You are using Python 3 where print was turned from a statement into a function. You need to use the following instead. 

print('34ki') 
print(6)
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

RE: help with simple print statement! "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-08-24 19:59 +0000
  Re: help with simple print statement! Hans Mulder <hansmu@xs4all.nl> - 2012-08-26 11:01 +0200

csiph-web