def list_replace(the_list, find, replacement):
 for (i, v) in enumerate(the_list):
  if (v == find):
   the_list[i] = replacement

def list_replace ( the_list , find , replacement ) : for ( i , v ) in enumerate ( the_list ) : if ( v == find ) : the_list [ i ] = replacement
replace all occurrences of find with replacement in the_list .