On Fri, 24 Oct 2014 19:40:39 +0100, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
>On 24/10/2014 19:20, Seymore4Head wrote: >> I meant to type: >> if y in range(1,10) doesn't work. >> Sigh >> Sorry >> > >How many more times, state what you expect to happen and what actually >happens. "doesn't work" is useless. Please read this http://sscce.org/ Good suggestion. OK how is this? It doesn't print what I expect. Does it print what you expect? name="123-xyz-abc" for x in name: if x in range(10): print ("Range",(x)) if x in str(range(10)): print ("String range",(x)) http://i.imgur.com/EGKUpAb.jpg -- https://mail.python.org/mailman/listinfo/python-list