Checking homogeneity of Array using List in Python

Neil Cerutti neilc at norwich.edu
Mon Aug 26 09:49:01 EDT 2013


On 2013-08-25, sahil301290 at gmail.com <sahil301290 at gmail.com> wrote:
> 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.

Impossible. I think.

-- 
Neil Cerutti



More information about the Python-list mailing list