def wp_sortkey(string):
  """Help function to sort WPs. Use as
      wps = ['Medium','Tight','Loose','VTight','VLoose','VVTight']
      sorted(wps,key=wp_sortkey)
  """
  lowstr = string.lower()
  if lowstr.startswith('medium'):
    return 0
  elif lowstr.lstrip('v').startswith('loose'):
    return -1*(lowstr.count('v')+1)
  elif lowstr.startswith('tight'):
    return 1*(lowstr.count('v')+1)
  return 100+len(string)