So, I am trying to create a program which counts the number of characters in a string which the user inputs, but I want to discard any spaces that the user enters.
Some code as close as possible to your original:
def main(): full_name = input("Please enter in a full name: ").split() total = 0 for x in full_name: total += len(x) print(total)
However, I think len(full_name) - full_name.count(' ') is better.
len(full_name) - full_name.count(' ')