The correct and fast way to test multiple variables against one value is by using set with separate if-statements so that Python will read each statement whether the former were True or False. Such as:
x=0
y=1
z=3
mylist=[]
if 0 in {x, y, z}:
mylist.append("c")
if 1 in {x, y, z}:
mylist.append("d")
if 2 in {x, y, z}:
mylist.append("e")
if 3 in {x, y, z}:
mylist.append("f")
print(mylist)
This code will also work, but if you are comfortable using dictionaries you can clean this up by making an initial dictionary mapping the numbers to the letters you want, then just by using a for-loop:
x=0
y=1
z=3
mylist=[]
num_to_letters = {0: "c", 1: "d", 2: "e", 3: "f"}
for number in num_to_letters:
if number in {x, y, z}:
mylist.append(num_to_letters[number])
print(mylist)