PROGRAMMING
GAME DEVELOPMENT
len()
, find()
, replace()
& split()
Python provides a lot of pre-defined string functions to carry out simple operations on a string like finding the length of the string, or checking whether a substring is present in a string or not, or replace a part of the string, or to split a string, all this can easily be done using string functions.
Click the button, to Run the code again.
CODE SNIPPETS
;
to join two Executable Statements/
to break code into multiline codelen()
, find()
, replace()
& split()
zip
function to iterate over two Listsdel
, remove()
or pop()
insert()
, reverse()
& sort()
What is Studytonight?
Tutorials
Learn to Code
Interview Questions
/code/python/python-string-functions.php