xFactorSchool.com
Python
JavaScript
How to Do Examples
C Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Compilers
C Compiler
C++ Compiler
C# Compiler
Java Compiler
Python Compiler
HTML Code Editor
CSS Code Editor
JavaScript Compiler
JavaScript Code Editor
Practice how to replace a substring of a string with specified string in Python
Python Online Editor
Execute Code
More Python Sample Codes
# Replace a substring of a string with specified string. #syntax: replace(oldsubstring, newsubstring) str_Variable = "Java is a programming language." rp_Variable = str_Variable.replace("Java", "Python") # "Java" is replaced by "Python" print(rp_Variable) # Output: Python is a programming language.