मराठी

File = open('textfile.txt','w') word = '' while word.upper() != 'END': word = raw_input('Enter a word use END to quit') file.write(word + '\n') file.close() The above program is to create

Advertisements
Advertisements

प्रश्न

file = open('textfile.txt','w')
word = ''
while word.upper() != 'END':
     word = raw_input('Enter a word use END to quit')
     file.write(word + '\n')
file.close()

The above program is to create a file storing a list of words. What is the name of file on hard disk containing list of words?

अति संक्षिप्त उत्तर
Advertisements

उत्तर

The file is named textfile.txt, as specified in the open() statement.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Data File Handling - EXERCISE [पृष्ठ १४५]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 7 Data File Handling
EXERCISE | Q 1. | पृष्ठ १४५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×