I am trying to input a gender of either 'M' or 'F' into an array however when i try to check for the presence of either M or F the while loop checks the variable for presence of M and F instead of either of them.
Count1 = 0
Count2 = 0
VarArray = []
while Count1 < 1:
VarArray.append(str(input('Enter your name: ')))
Count2 = Count2 + 1
VarArray.append(str(input('Enter your gender as M or F: ')))
while VarArray[Count2] != 'M' or VarArray[Count2] != 'F':
VarArray.append(str(input('Please enter your gender as either \'M\' or \'F\': ')))
VarArray.append(int(input('Enter your score for test 1: ')))
VarArray.append(int(input('Enter your score for test 2: ')))
VarArray.append(str('|'))
Count1 = Count1 + 1
Count2 = Count2 + 1
print(VarArray)
Is there a way to get this to work using this method or do i need to create two separate while loops for this.