Hi folks, ThompsonSensibl, so I'm new to Python.
This is probably a noob question...
I want to convert a String input to an Integer. I usually do it like this: number = int(someString). However this time this approach doesn't seem to be efficient at all.
So far I have:
#To get number inputs: print 'Enter the numbers.' read = sys.stdin.readline() #Getting the String input (...numbers of type String, not Integer!) into an array array = read.split() #Converting String content of array into an Integer. firstNumber = int(array) secondNumber = int(array) thirdNumber = int(array) ...#etc. etc.
As you can see, this conversion process (from String to Integer) is very inefficient as you must convert each cell one by one...
Is there a more efficient alternative solution to this conversion process???
Edited by thompsonSensibl: n/a