Skip to content

Commit cbfec67

Browse files
committed
fix bug in stringify
1 parent 3db81e5 commit cbfec67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assignment2/assignment2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def generate_sentence(counts, context, length=10) -> list:
2828

2929

3030
def stringify(sentence) -> list:
31-
return " ".join(" ".join(gram) for gram in sentence)
31+
return " ".join("".join(gram[0]) for gram in sentence)
3232

3333

3434
if __name__ == '__main__':

0 commit comments

Comments
 (0)