I make this example code for my problem.
I need to get out just True
or False
and stop the loop but i dont know how?
def test():
list = [u"sam", u"jay", u"jean", u"smo", u"gon", u"bil"]
user = u"jean"
for x in list:
if user==x:
print True
else:
print False
test()
The output:
False
False
True
False
False
False