Home / Questions / Other Python में text file read करने का सही तरीका क्या है? — interview में इसका सही जवाब क्या है? Other 0 Views Verified Python में text file read करने का सही तरीका क्या है? — interview में इसका सही जवाब क्या है? #python #python programming #coding #developer Sarkari Result QA Bank Editorially reviewed exam information Share
Verified file.read('data.txt') file.read('data.txt') Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified open_file('data.txt') open_file('data.txt') Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified Correct Answer with open('data.txt', 'r', encoding='utf-8') as f: text = f.read() with open('data.txt', 'r', encoding='utf-8') as f: text = f.read() Additional Explanation with open context manager file को safely close करता है।
Verified with file('data.txt'): with file('data.txt'): Additional Explanation यह विकल्प सही समाधान नहीं है।