To convert from a numerical string to an integer value, use int(str[,base]) function. If you want to convert from a numerical string to a floating-point number, use float(str) function.
String to integer conversion:
x=int(y,10) #base 10
String to float conversion:
Posted by: Dara | post date: 02-07-2013 | Subject: Python Programming Language
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: