Published on January 26, 2024By DeveloperBreeze
# Read content from a file
with open('read.txt', 'r') as read_file:
file_content = read_file.read()
# Write content to a file
with open('write.txt', 'w') as write_file:
write_file.write('Hello, Python!')
Comments
Please log in to leave a comment.