Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

File Write in python

Python Program to Earse the content of file sample.txt and write something new.

Program or Solution

content=input("Enter a String:")


Program Explanation

open the file in write mode write the content into the file using write() method close() the file.