Advertisements
Advertisements
प्रश्न
Explain the use of output function write() with an example.
कोड लेखन
स्पष्ट करा
Advertisements
उत्तर
write(): Writes one string. It does not add a newline automatically.
with open("data.txt", "w") as file:
file.write("First line\n")shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
