AI engineering glossary · Python core
What is string method?
String method: A function attached to a string object and called with dot notation, such as upper(), lower(), strip(), split(), join(), replace(), find() and startswith(). Because strings are immutable, these methods return new strings instead of changing the original.
String method: an example
' Hi, there '.strip().split(',') returns ['Hi', ' there'], and '-'.join(['a', 'b']) returns 'a-b'.
Related terms
More Python core terms
Where you learn it
String method is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.