No matter how format my my code, It will not assert that “first_chars” is a str.
I have tried to contact the admins of the class, but they are being slow.
Is there something I am missing?
f = open('assets/travel_plans.txt', 'r')
first_chars = f.read(33)
print(first_chars)
print(type(first_chars))
assert type(first_chars) == str, "first_chars is not a string"
assert len(first_chars) == 33, "first_chars is not assigned the correct length"
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[23], line 1
----> 1 assert type(first_chars) == str, "first_chars is not a string"
2 assert len(first_chars) == 33, "first_chars is not assigned the correct length"
AssertionError: first_chars is not a string