Python Brain Teasers: Teaser 3 wrong answer

I did not doubt that you have tested the code.
Your file definitely has different chars in it. Below the file /tmp/krakow has your string on the first line and mine that I typed on my Mac. Yours is o + Combining Acute Accent and mine is Latin Small Letter O with Acute. If I needed to I am sure I could figure out how to type combining acute accent, but when working through the book and seeing a char i can type with two keystrokes on my mac (option + e, o) I am going to do that. It might be valuable to note this in the book in someway.

❯ more /tmp/krakow
Kraków
Kraków

❯ xxd -b -c9 /tmp/krakow
00000000: 01001011 01110010 01100001 01101011 01101111 11001100 10000001 01110111 00001010  Krako..w.
00000009: 01001011 01110010 01100001 01101011 11000011 10110011 01110111 00001010           Krak..w.

❯ xxd  -c9 /tmp/krakow
00000000: 4b72 616b 6fcc 8177 0a  Krako..w.
00000009: 4b72 616b c3b3 770a     Krak..w.
3 Likes