+ 1
Python: having two ASCII codes in one string
The code runs correctly except in point 3, where I created a string with two codes, but they are not replaced, how can I fix? https://code.sololearn.com/cZA2apT2PmDa/?ref=app
4 ответов
+ 1
ravilnicki What a fool! Thank you!
+ 1
Also, I recommend only using try blocks to really handle errors. In this case, point 3 generated an error which clearly showed what ravilnicki explained, but the try block made that invisible.
Instead, I suggest checking the variables to decide whether to replace the string or not - which is the try block decision.
Keep errors visible when at all possible. And get used to read them.
0
Ok, thanks for your help and advice, I publish the code
https://code.sololearn.com/cJAgj2hEy2AZ/?ref=app