+ 2
Operand
Hi, Suppose x='123' x+='gfr' print (x) will result 123gfr Question: Can I substract 'gfr' as well?
1 Answer
+ 3
Subtracting strings by '-' operator is not defined, but you can call replace method on a string.
Examples:
"foo bar baz".replace("bar ", "")
"123gfr".replace("gfr", "")