Comment by vova_hn2
1 month ago
> Behold! Plato’s man. [0]
def replace_em_dash(text: str) -> str:
"""
+-------------------+
| ( ͡° ͜ʖ ͡° ) |
+-------------------+
"""
return text.replace("—", "\u10EAD\u10EAC")
[0] usually attributed to Diogenes
Behold indeed.
This is really funny and I do feel ashamed for my laziness.
I didn't expect ChatGPT to make such trivial mistake, although, I have no idea which model do they use on the free plan these days.
The correct code is, of course:
...in case anyone is curious.
Curiously enough, after telling it "your code is broken, can you find the mistake?" it was able to correct the code:
3 replies →