What is the difference between
z=int(raw_input()) and z=eval(raw_input())(I thought them to be
the same in case of integers)
I mean when an integer is entered in that case are they same and when
an integer in not entered,in that case how are they different?
--
http://mail.python.org/mai
On Jun 16, 3:34 pm, Francesco Bochicchio wrote:
> On 16 Giu, 11:32, Prasoon wrote:> I am new to
> pythonand using python 2.6
> > I want to know when to use raw_input( ) and when to use input( )???
>
> > According to my interpretation one should use input( ) when ente
I am new to pythonand using python 2.6
I want to know when to use raw_input( ) and when to use input( )???
According to my interpretation one should use input( ) when entering
numbers etc and
raw_input( ) when a string is too be entered.
Correct me if I am wrong
Also if I want to ent
> You could do:
>
> while True:
> x = raw_input("Enter x=>")
> if x != "" : break # if you just press enter, raw_input returns an
> empty string
>
> Note that this still leaves out the case when you type something which
> is not a number.
> To cover this case, supposing that you need a float
On Jun 12, 11:28 am, Chris Rebert wrote:
> On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote:
> > I am new to python
> > I have written the following program in python.It is the solution of
> > problem ETF in SPOJ.
>
> > #Euler Totient Function
>
> &
On Jun 12, 11:28 am, Chris Rebert wrote:
> On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote:
> > I am new to python
> > I have written the following program in python.It is the solution of
> > problem ETF in SPOJ.
>
> > #Euler Totient Function
>
> &
ved to the next line.I get
an error
_SyntaxError- EOF while parsing and the program terminates.._
How should the code be modified so that even after pressing an extra
"Enter" button the cursor get moved to the next line instead to
throwing an exception..
Prasoo