Commit ccdb9104 authored by Jeroen F.J. Laros's avatar Jeroen F.J. Laros

if True return True else return False.

parent 73e91d13
......@@ -36,9 +36,7 @@ class Trie(object):
return node
def __contains__(self, word):
if '' in self._find(word):
return True
return False
return '' in self._find(word)
def add(self, word):
......@@ -54,6 +52,4 @@ class Trie(object):
node[''] = {}
def has_prefix(self, word):
if self._find(word) != {}:
return True
return False
return self._find(word) != {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment