Which version of python you are using? In python 2.x, you have to use raw_input
In python 3, it is input. Usually, the type is taken care automatically, you don't have to worry about the variables type in python. Regards, RK On Tue, May 7, 2013 at 9:09 AM, Gora Mohanty <[email protected]> wrote: > On 7 May 2013 07:19, Umesh Tiptur <[email protected]> wrote: > > Hi, > > > > I am very new to programming in python. But I want to know is user hass > inputted a number or a string > > > > Please help with this HOW to.. > [...] > > * You can use type( var ) to find the type of a variable, var > * Typically, one should not need to know the type of a variable > * This is a very basic question that can be answered by a book > or an online learning resource. Searching Google would find > this, for example. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > [email protected] > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
