trying to make a simple function that'll take a phrase, a letter, and then output the original phrase with that letter removed. I can do the simple version but seem to get my wires crossed when I try to cover both lowercase and uppercase. ( it works fine if i do just 'if i not in aChar)
i.e. If i input 'Board of Trade' and my letter to extract is 'O', i want both the uppercase and the lowercase removed. I'm a beginner so any general tips regarding my code would be much appreciated as well.
Here's my script:
def removal(statement,aChar):
   newstring = ''
   lowercase = aChar.lower()
   uppercase = aChar.upper()
   for i in statement:
       if i not in aChar or lowercase or uppercase:
             newstring = newstring+i
   print(newstring)
removal('Board of Trade', 'O')    
 
     
     
     
     
     
    