Python Forum
Generate String Only Unique to That Platform
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate String Only Unique to That Platform
#3
(Sep-10-2019, 03:33 PM)snippsat Wrote: Can use uuid.
It provides the uniqueness as it generates ids on the basis of time,Computer hardware (MAC etc.).
>>> import uuid
>>> 
>>> str(uuid.uuid4())[:6]
'5a7fce'
Quote:especially in Python 2.7
Then stop using Python 2.7 Hand

Yes but UUID is different everytime u run it.
I need the same I'd to be generated everytime for the same platform.

About py2.7 I wish u could come n tell those people chg to py3 !
Reply


Messages In This Thread
RE: Generate String Only Unique to That Platform - by firesh - Sep-10-2019, 09:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sample random, unique string pairs from a list without repetitions walterwhite 1 465 Nov-19-2023, 10:07 PM
Last Post: deanhystad
  generating random string unique forever Skaperen 5 2,339 Aug-20-2021, 07:15 AM
Last Post: Gribouillis
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,834 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  platform binary representation --- 3 questions Skaperen 4 2,802 Dec-05-2020, 03:50 AM
Last Post: Skaperen
  Generate unique random numbers from different lists Takeshio 5 3,804 May-24-2019, 07:29 PM
Last Post: ichabod801
  turtle moving platform chappie 1 3,032 Dec-06-2017, 10:52 PM
Last Post: chappie

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020