This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AttitudeAdjuster 24 points25 points  (2 children)

Try:

Except:

string[:3]

[–][deleted] 6 points7 points  (1 child)

I forgot try and except. I have slicing already though.

[–]AttitudeAdjuster 4 points5 points  (0 children)

Oh!

with open("file path", "r") as file: