diff options
Diffstat (limited to 'ass2/ukkonen.py')
| -rw-r--r-- | ass2/ukkonen.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ass2/ukkonen.py b/ass2/ukkonen.py index 5aa94e7..eb49820 100644 --- a/ass2/ukkonen.py +++ b/ass2/ukkonen.py @@ -1,4 +1,5 @@ """ +Alexander Occhipinti - 29994705 This file is imported into questions 2 and 3. """ @@ -39,12 +40,12 @@ class OrderedDict(dict): """ Define a number value to an alphabet letter, including special characters so they can fit in a list """ - if char == "$": - return 26 - elif char == "&": - return 27 + if char == "$": # Designates end of string + return 0 + elif char == "&": # Designates break in two strings (Used for Q3) + return 1 else: - return ord(char) - 96 + return ord(char) - 95 # Letters a-z class Node: |
