It’s very hard to tell what you’re expecting to be different than
what you’re seeing, and why. All I can guess without more context is
that your font doesn’t distinguish “ínp” from “inp” and you’re
assuming they’re the same string when they aren’t.
You are not testing what you think you are. Let us do the following:
mdx = 'inp'
print('-111-' + mdx)
for a in 'ínp':
print(ord(a), ":", a)
if mdx != 'ínp':
print('-222-' + mdx) # where _ stands for space
print('-333-' + mdx)
…where I copied the ‘inp’ in the line for a in 'ínp': from your test. This results in the output:
-111-inp
237 : í
110 : n
112 : p
-222-inp
-333-inp
chr(237) is not an i but an i with a grave accent.