Posted By

ronakpatel2006 on 08/11/11


Tagged

guid


Versions (?)

Generate Unique id


 / Published in: Python
 

  1. import os
  2.  
  3. def unique_id():
  4. return os.urandom(10).encode('hex')
  5. print " Printing Unique_id"
  6. a=unique_id()
  7. print a
  8.  
  9. OR
  10.  
  11. import uuid
  12. print uuid.uuid4()

Report this snippet  

You need to login to post a comment.