Apr-27-2022, 05:10 AM
How to split a number to list and list sum must be number
Example :
x = 8
i want to split and make a list with 3 items and the sum of list must be equal to x
y = [3, 3, 2]
Any help is appreciated
Example :
x = 8
i want to split and make a list with 3 items and the sum of list must be equal to x
y = [3, 3, 2]
Any help is appreciated