Skip to content

Instantly share code, notes, and snippets.

@makesomelayouts
Last active November 6, 2025 06:21
Show Gist options
  • Select an option

  • Save makesomelayouts/72905be1a9ce71ebc17acf74cb3db155 to your computer and use it in GitHub Desktop.

Select an option

Save makesomelayouts/72905be1a9ce71ebc17acf74cb3db155 to your computer and use it in GitHub Desktop.
file manipulation in python
options:
r=read,
w=write (change old data to new data),
rb/wb=read/write-binaryy (for binary files),
a=append(add new data to old data).
with open('response.txt') as f:
print(f.read())
f.close()
with open('1.txt', 'w') as f:
f.write('Hello, world!')
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment