I've been trying to use .upper and .replace to turn non standard input like "helLo woRLD" to "HELLOWORLD" to make it easier to handle.
This seems so simple, and it works fine to turn it to uppercase, but it simply won't remove the spaces.
Code:
cmd = input("Please input a command: ")
cmd = cmd.upper()
cmd.replace(" ","")
print("%s" % (cmd))
With this, if I enter "Hello World" it would print "HELLO WORLD" with the spaces still there, and I have no idea why it's not working.
EDIT: This is embarrassing, I just realized a literally had to do
cmd = cmd.replace(" ","")
instead of what I had, flagging this because I figured it out
print(input("Please input a command: ").upper().replace(" ",""))