Q. Write statements to open a binary file C:\Myfiles\Text1.txt in read and write mode by specifying the file path in two different formats.
Answer =
Format one:-
file = open ("C:\\Myfiles\\Text1.txt", 'r')
Format two:-
file = open (r"C:\Myfiles\Text1.txt", 'w')
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )