* Nikhil Verma <[email protected]> [2012-03-26 08:09]: > Hi All > > How can we generate a 6 digit random number from a given number ? what about this?
>>> given_number=123456
>>> def rand_given_number(x):
... s = list(str(x))
... random.shuffle(s)
... return int(''.join(s))
...
>>> print (rand_given_number(given_number))
653421
--
http://mail.python.org/mailman/listinfo/python-list
