code: def is_primitive(var):
      
      primitives = ( float, long, str, int, dict, list, unicode, tuple, set, frozenset, datetime.datetime, datetime.timedelta, type(None) )
      for primitive in primitives:
          if type( var ) == primitive:
              return True
      return False
docs: Checks if an object is in ( float, long, str, int, dict, list, unicode, tuple, set, frozenset, datetime.datetime, datetime.timedelta )