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): ...@@ -36,9 +36,7 @@ class Trie(object):
return node return node
def __contains__(self, word): def __contains__(self, word):
if '' in self._find(word): return '' in self._find(word)
return True
return False
def add(self, word): def add(self, word):
""" """
...@@ -54,6 +52,4 @@ class Trie(object): ...@@ -54,6 +52,4 @@ class Trie(object):
node[''] = {} node[''] = {}
def has_prefix(self, word): def has_prefix(self, word):
if self._find(word) != {}: return self._find(word) != {}
return True
return False
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