human
Write me a the Python code you requested given the following:
Write a function to convert a given string to a tuple of characters. Here is a solution in Python:
assistant
#Here is the Python code you requested.
 def string_to_tuple(str1):
    result = tuple(x for x in str1 if not x.isspace()) 
    return result