Skip to content

Instantly share code, notes, and snippets.

@LimaGuilherme
Created May 4, 2020 20:26
Show Gist options
  • Select an option

  • Save LimaGuilherme/878c7a2cfaba196fe0b1f9a88dcf8562 to your computer and use it in GitHub Desktop.

Select an option

Save LimaGuilherme/878c7a2cfaba196fe0b1f9a88dcf8562 to your computer and use it in GitHub Desktop.
f = open('workfile' ,'w')
new_content = 'someContent'
f.write(new_content)
f.seek(0)
line = f.readline()
print line
>> someContent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment