ezoic

Thursday, February 16, 2017

Another problem using bool

testing if an item is in a list, not use in.


class Solution:
    def is_member(self, a,x):
        bool1=0
        for i in range(len(x)):
            bool1=bool1+bool(a==x[i])

        if bool1==0:
            return('False')

        if bool1>0:
            return('True')


No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...