Checking homogeneity of Array using List in Python

sahil301290 at gmail.com sahil301290 at gmail.com
Sun Aug 25 01:50:24 EDT 2013


I am unable to check homogeneity of Array.
I have take Array type Int to be default for my code.

Instead of getting Error on NON-INT Values.
I want to take input as string.
Then check if all input is in (0-9) form, I typecast it into int and Accept.
Else, I would like to skip that input.

eg. my input is ['1', ' ', 'asdasd231231', '1213asasd', '43242']
I want it to be interpreted as:
[1, [None], [None], [None], 43242]

NOTE: NO INBUILT FUNCTION BE USED. Thank you in advance.



More information about the Python-list mailing list