open file find and replace commas python

Solutions on MaxInterview for open file find and replace commas python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "open file find and replace commas python"
Sebastián
02 Jun 2016
1with open('outputFile', 'r+') as f:
2    text = f.read()
3    f.seek(0)
4    f.truncate()
5    f.write(text.replace('(comma)', ' , '))
6
similar questions
queries leading to this page
open file find and replace commas python