<human>:  Can you show me a Python function to check if a variable is iterable.
<bot>: Here is a Python function to check if a variable is iterable

import sys

def is_iterable(x):
  """Checks if a variable is iterable."""
  return hasattr(x, "__iter__")

# Enter the variable
variable = "hello"

# Calling the function
print((is_iterable(variable)))

#Example Output
# True

#Remember to inspect code for bugs.