Is it possible to write shorter line, check the conditions?

Is there a way to simplify the following code:
if csv_tr_opcode == 2 and one_row.opcode == 3 or one_row.opcode == 6:
June 8th 19 at 17:19
2 answers
June 8th 19 at 17:21
Solution
if csv_tr_opcode == 2 and one_row.opcode in [3, 6]:
#this corresponds to only 
if csv_tr_opcode == 2 and (one_row.opcode == 3 or one_row.opcode == 6):
#not 
if csv_tr_opcode == 2 and one_row.opcode == 3 or one_row.opcode == 6:
June 8th 19 at 17:23
if all([csv_tr_opcode == 2, one_row.opcode in (3, 6)]):

Find more questions by tags Python