[Tutor] Data persistence problem
Arijit Ukil
arijit.ukil at tcs.com
Fri Jun 21 08:21:30 CEST 2013
I have following random number generation function
def rand_int ():
rand_num = int(math.ceil (random.random()*1000))
return rand_num
I like to make the value of rand_num (return of rand_int) static/
unchanged after first call even if it is called multiple times. If x=
rand_int () returns 45 at the first call, x should retain 45 even in
multiple calls.
Pls help.
Regards,
Arijit Ukil
Tata Consultancy Services
Mailto: arijit.ukil at tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Consulting
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130621/10ca68ba/attachment.html>
More information about the Tutor
mailing list