0
I’m conducting experiments on Python and this time my targets were the functions that handle Strings.
In my tests, I’m trying to make a text converter, however, the functions are not performing their functionality in my Visual Studio Code. The strange thing is that in IDLE conversions occur normally, the problem occurs only in Vscode.
Does anyone know what might be going on?
Follows print.
strings are immutable objects. Check this question: https://answall.com/questions/500210/se-strings-em-python-s%C3%A3o-imut%C3%A1veis-como-conseguimos-alter%C3%A1-la-com-o-m%C3%A9all-repl
– Lucas
Although the above question is not 100% exactly identical, the idea is the same: any method that "modifies" the string (such as
lower
,upper
, etc), actually returns another string, so you need to assign the return to some variable (including one of the answers mentions exactly that), and therefore the solution is the same (so I indicated as duplicate)– hkotsubo