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
> Lie Ryan (LR) wrote:
>LR> Piet van Oostrum wrote:
Prasoon (P) wrote:
>>>
>P> What is the difference between
>P> z=int(raw_input()) and z=eval(raw_input())(I thought them to be
>P> the same in case of integers)
>>>
>P> I mean when an integer is entered in that case are they s
Piet van Oostrum wrote:
>> Prasoon (P) wrote:
>
>> P> What is the difference between
>> P> z=int(raw_input()) and z=eval(raw_input())(I thought them to be
>> P> the same in case of integers)
>
>> P> I mean when an integer is entered in that case are they same and when
>> P> an integer in
> Prasoon (P) wrote:
>P> What is the difference between
>P> z=int(raw_input()) and z=eval(raw_input())(I thought them to be
>P> the same in case of integers)
>P> I mean when an integer is entered in that case are they same and when
>P> an integer in not entered,in that case how are they
Prasoon wrote:
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)
Note that you can (and probably should) provide a prompt as an arg to
input and raw_input.
I mean when an integer is entered in that case are they s
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 entering
> > numbers etc and
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 entering
> numbers etc and
> raw_input( ) when a string is too be entered.
>
> Cor
Prasoon:
> I am new to pythonand using python 2.6
> I want to know when to use raw_input( ) and when to use input( )???
I think it's better to always use raw_input(), and then convert the
string to the data to work on.
Once in a while you may want to use input() to input expressions (like
for