file_object.writable()
Returns Boolean value True or False. Returns True if file is writable , otherwise False .
fob=open('data1.txt','r')
print(fob.writable()) # False
fob=open('data1.txt','w')
print(fob.writable()) # True
fob=open('data1.txt','a')
print(fob.writable()) # True
fob=open('data1.txt','+a')
print(fob.writable()) # True
Moving the file position by seek()
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.