code: def toList(variable, types=(basestring, int, float, )):
      
      if isinstance(variable, types):
          return [variable]
      else:
          return variable
docs: Converts a variable of type string, int, float to a list, containing the
      variable as the only element.
  
      :param variable: any python object
      :type variable: (str, int, float, others)
  
      :returns: [variable] or variable