Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: Checking homogeneity of Array using List in Python Date: 26 Aug 2013 13:49:01 GMT Organization: Norwich University Lines: 19 Message-ID: References: <39cf54bd-3772-448a-a56e-74e0b3cc8017@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net wh+jN5cajTYpASAQbBtgUw5nhjtaCi9pIvq4u1VWFbrNw0MU+R Cancel-Lock: sha1:VMbM1U4qkazh7sx14hbWCEw0ta4= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:53001 On 2013-08-25, sahil301290@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