Answers for "file handling in python programiz"

0

file handling in python programiz

f = open("test.txt")      # equivalent to 'r' or 'rt'
f = open("test.txt",'w')  # write in text mode
f = open("img.bmp",'r+b') # read and write in binary mode
Posted by: Guest on July-01-2021
0

file handling in python programiz

>>> f = open("test.txt")    # open file in current directory
>>> f = open("C:/Python38/README.txt")  # specifying full path
Posted by: Guest on July-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language