def string_length(mystring): if type(mystring) == int: return "Sorry, integers don't have length" else: return len(mystring)