def isiterable(x):
 try:
  iter(x)
  return True
 except TypeError:
  return False

def isiterable ( x ) : try : iter ( x ) return True except TypeError : return False
returns true if the given object is iterable .