string method

A method that belongs to strings, such as upper, lower, count, find, replace, split, strip, startswith or join.

In more detail

Strings are immutable, so string methods never change the original; they return a new string, or a number, list or Boolean. dir(str) lists them all and help(str.find) explains one.

Related terms

Taught in

References

Certification courses