adding elements from variable to list python code example
Example 1: how to add variable in list python
Num = 19
listNum = [16 , 17 , 18]
listNum.append(Num)
print(listNum)
Example 2: how to add a variable in list
print('Hee')
Num = 19
listNum = [16 , 17 , 18]
listNum.append(Num)
print(listNum)
print('Hee')