Saturday, 3 November 2012

Difference Between input() and raw_input()?

The major difference between input() and raw_input() is of data type.
As raw_input() takes only input from user as String data type. but when we perform some action on it, interperetar generate error or give answer against our expectaions

While using input() it can take integer data and when program perform action on that data it gives results according to our desires and this way is easy to use. Sometimes it can deal with any data type but in some cases we have to mention other data types.

No comments:

Post a Comment