def update_file(filename, string):
 with open(filename, 'w') as file_fd:
  file_fd.write(string)

def update_file ( filename , string ) : with open ( filename , 'w' ) as file_fd : file_fd . write ( string )
update a file with a new value .