As the title says. If you copy and paste the title 'de'=='de'
and execute it in python, it will be False
.
It was puzzling, but when I looked it up, the second character, de
, was actually composed of te
and `` dakuten''.
a = 'De'
b = 'De'
text = f'''
How are the two des displayed?
The first one: {a}
Second: {b}
Are the two des the same?: {a==b}
How long is each string?
a : {len(a)}letter
b : {len(b)}letter
What are the first and second letters of b?
b[0] : {b[0]}
b[1] : {b[1]}
By the way, what happens if you use a byte string?
a : {a.encode()}
b : {b.encode()}
"The second de was actually two letters!"
'''
print(text)
Recommended Posts