def ConvertStringsToColumnHeaders(proposed_headers):
 headers = []
 for input_string in proposed_headers:
  sanitized = input_string.lower().replace('_', '').replace(':', '').replace(' ', '')
  header_count = headers.count(sanitized)
  if (header_count > 0):
   headers.append(('%s_%i' % (sanitized, (header_count + 1))))
  else:
   headers.append(sanitized)
 return headers

def ConvertStringsToColumnHeaders ( proposed_headers ) : headers = [ ] for input_string in proposed_headers : sanitized = input_string . lower ( ) . replace ( '_' , '' ) . replace ( ':' , '' ) . replace ( ' ' , '' ) header_count = headers . count ( sanitized ) if ( header_count > 0 ) : headers . append ( ( '%s_%i' % ( sanitized , ( header_count + 1 ) ) ) ) else : headers . append ( sanitized ) return headers
converts a list of strings to column names which spreadsheets accepts .