On 21/12/19 2:50 pm, Greg Ewing wrote:
On 21/12/19 1:59 am, Stefan Ram wrote:
I would like to add a method to a string.
This is not possible in Python?
It's not possible. Built-in classes can't have methods added
to them.
You can define your own subclass of str and give it whatever
On 21/12/19 1:59 am, Stefan Ram wrote:
I would like to add a method to a string.
This is not possible in Python?
It's not possible. Built-in classes can't have methods added
to them.
You can define your own subclass of str and give it whatever
methods you want.
But in your case:
for