Hi
I have an idea to rand some digit which sum is equal to my inputs digit. If I put in 12 then I like to have 4, 2, 6 or 4,4, 4 or 3, 3, 3, 3 …….etc. Not more and not lease then my input.
In my function X= a digit from 1 to 52.

def dela(x):
sum =0
while sum <=x:
b= random.randrange (1,x-1)
sum = sum+b
print b,
return sum