I created a function that would count the number of characters in a string but it also counts the white spaces.
Here is my code:
def count_characters_in_string(mystring):
string_1 = mystring
print("The number of characters in this string is:", len(string_1))
count_characters_in_string("Apples and Bananas")
Is there a way to not count the white spaces?