Re: tweaking random number

2012-05-09 Thread Peter Otten
Nikhil Verma wrote: > Hi All > > I want to generate a random number of 8 digits which involve 3 number and > 5 digits. > Like this :- > > def random_number(): > # do something > > random_number() > "123abcde" # first 3 numbers and 5 letters after the numbers. > > I am able to generate the

Re: tweaking random number

2012-05-09 Thread Chris Angelico
On Wed, May 9, 2012 at 5:01 PM, Nikhil Verma wrote: > Hi All > > I want to generate a random number of 8 digits which involve 3 number and 5 > digits. (That's 3 digits and 5 letters) Pretty easy. Do you want to distinguish between uppercase and lowercase letters? Your current random_number funct

Re: tweaking random number

2012-05-09 Thread MRAB
On 09/05/2012 08:01, Nikhil Verma wrote: Hi All I want to generate a random number of 8 digits which involve 3 number and 5 digits. Like this :- def random_number(): # do something random_number() "123abcde" # first 3 numbers and 5 letters after the numbers. I am able to generate the ran

tweaking random number

2012-05-09 Thread Nikhil Verma
Hi All I want to generate a random number of 8 digits which involve 3 number and 5 digits. Like this :- def random_number(): # do something random_number() "123abcde" # first 3 numbers and 5 letters after the numbers. I am able to generate the random number 8 digit like this:- def random_n