My Python code is trying to take the inputs that the user has given and give them back but in line 5 I want the user to only be able to write either m or f and nothing else so I looked up if python had a char data type like c++ but it doesn't so I kept looking and people said that you could use strings as a data type but I don't know how to implement that so I hope you guys can help enlighten me.
Here is the link to the code the important parts are 4 and 5. What is written was more of a guess.
#Input your information
name = input("Enter your Name: ")
surname = input("Enter Surname: ")
str(m,f)
gender = str(input("What is your gender?(m,f)")
height = input("Enter your Height: ")
#Print your information
print("\n")
print("Printing Your Details")
print("Name", "Surname", "Age","Gender","Height")
print( name, surname, age, gender, height)
inputalready is of typestr, no need to "convert" it