I am out of trial and error again Lists

Seymore4Head Seymore4Head at Hotmail.invalid
Sat Oct 25 00:58:04 CEST 2014


On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head
<Seymore4Head at Hotmail.invalid> wrote:

name="123-xyz-abc" 
a=range(10)
b=list(range(10))
c=str(list(range(10)))
print ("a",(a))
print ("b",(b))
print ("c",(c))

for x in name:
    if x in a:
        print ("a",(x))      
    if x in b:
        print ("b",(x))  
    if x in c:
        print ("c",(x))

B is type list and C is type str.
I guess I am still a little too thick.  I would expect b and c to
work. 
http://i.imgur.com/dT3sEQq.jpg



More information about the Python-list mailing list