Syntax of Python file

Put your programming skills to the test in these challenges.

Syntax of Python file

Post by ArjunKumar on Wed Jun 19, 2019 12:13 pm
([msg=98442]see Syntax of Python file[/msg])

Hello All, Can anyone tell me is it right syntax for input-output file for python?

f = open("file name", file_mode)

with open ("file name with txt extension", 'w') as file_object:
file_object.write("statement which you want to write in the txt file")

I just check here
New User
New User
Posts: 2
Joined: Wed May 01, 2019 12:06 am
Blog: View Blog (0)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests