I am trying to complete a short python code to output names of ducks. For those ducks whose first letters are 'O' and 'Q', they must be printed with a 'u' after the first letter. I have tried out my code but for some reason it prints the u with every single letter whether it is a 'Q' or any other letter.
prefixes = "JKLMNOPQ"
suffix = "ack"
for p in prefixes:
print(p + suffix)
if(p == 'O' or 'Q'):
print(p + 'u' + suffix)