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

R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...