0 votes
in Python by
What is Python String format and Python String replace?

1 Answer

0 votes
by
Python String Format: The String format() method in Python is mainly used to format the given string into an accurate output or result.

Subscribe to our youtube channel to get new updates..!

Syntax for String format() method:

template.format(p0, p1, ..., k0=v0, k1=v1, ...)

Python String Replace: This method is mainly used to return a copy of the string in which all the occurrence of the substring is replaced by another substring.

Syntax for String replace() method:

str.replace(old, new [, count])

Related questions

0 votes
asked Nov 15, 2020 in Python by rajeshsharma
0 votes
asked Jan 1, 2021 in Python by SakshiSharma
...