If statement - i think im doing something wrong

Question:
I am a fairly new person to python, and I am stuck trying to get my if statement to recognise an input. However, it will only give me the output from the first if block, or sometimes both. plz help… im in pain…

# i have blanked my name and my friends
typewriter("What would you like your character to be called?" + newline)
time.sleep(0.4)
typewriter("I will name my character ")
charname = input().title()
print("")
time.sleep(0.4)
if charname == "**** ******" or "****" or "******":
	typewriter("An excellent choice!")
else:
	typewriter(charname + "... ")
	time.sleep(0.4)
	typewriter("If you say so...")
time.sleep(3)

Here is the code for typewriter (incase that changes anything)

def typewriter(text):  #This was copied from a Youtube video. This is the link: https://youtube.com/shorts/Xv3j-8VZ5LI?si=OLd8iAv1ZOzdKu0S
	for char in text:
		print(char, end="")
		sys.stdout.flush()
		time.sleep(0.04)

so what you need to do is put this as the if statement:

# add the charname == part after the "or"s
if charname == "**** ******" or charname == "****" or charname == "******"
2 Likes

Sorry, i forgot to add the responce in question

What would you like your character to be called?
I will name my character mister john

Mister John... If you say so...An excellent choice!

Thank you so much. Ill remember to do that in the future!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.