while party!='R' and party!='D':
can this be shortened to
while party!='R' and 'D':
while party!=('R' and 'D'):
or the like? (that is, is there any equivalent expression with only one party!=)
while party!='R' and party!='D':
can this be shortened to
while party!='R' and 'D':
while party!=('R' and 'D'):
or the like? (that is, is there any equivalent expression with only one party!=)
 
    
     
    
    If you want to use multiple condition:
try this.
l=['R','D']
while party not in l:
 
    
    you can simply create list and use like this
validList = ['R', 'S']
# You can also use not in operator for other condition
if party in validList:
    # Do your stuff here
    print("It's Present")
