python how to put int into list code example
Example 1: python make integer into a list
res = [int(x) for x in str(num)]
Example 2: python how to put int into list
numList=[1,2,3]
num=4
numList.append(num)
res = [int(x) for x in str(num)]
numList=[1,2,3]
num=4
numList.append(num)