how to add variable in list python

Num = 19
listNum = [16 , 17 , 18]
listNum.append(Num)
print(listNum)

Here is what the above code is Doing:
1. We create a variable called Num and assign it the value 19.
2. We create a list called listNum and assign it the values 16, 17, 18.
3. We use the append() method to add the value of Num to the end of listNum.
4. We print the list.