Python cara membagi nomor
number = "12345"
result = []
for digit in number:
result.append(digit)
print(result)
# result is ['1', '2', '3', '4', '5']
Brave Buzzard
number = "12345"
result = []
for digit in number:
result.append(digit)
print(result)
# result is ['1', '2', '3', '4', '5']
# split a given int value in list
num = 13579
x = [int(a) for a in str(num)]
print(x)