Python Forum
How to create random hex message
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create random hex message
#1
Hello
need your help in a simple issue:

I want to create a random 16 chars message from this (0123456789ABCDEF)
so the output will be like this:
"AAB1C70ADD84C701"

I mange only to create a random int
 new_data = random.randint(111111111111,999999999999)
but how do I add Hex values?

Thanks ,
Reply


Messages In This Thread
How to create random hex message - by korenron - Jan-25-2021, 03:18 PM
RE: How to create random hex message - by korenron - Jan-25-2021, 03:34 PM
RE: How to create random hex message - by bowlofred - Jan-25-2021, 04:54 PM
RE: How to create random hex message - by nilamo - Jan-25-2021, 05:29 PM
RE: How to create random hex message - by DeaD_EyE - Jan-26-2021, 10:28 AM
RE: How to create random hex message - by korenron - Jan-26-2021, 10:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] why can't i create a list of numbers (ints) with random.randrange() astral_travel 7 1,602 Oct-23-2022, 11:13 PM
Last Post: Pedroski55
  how to create my own custom logging message maiya 4 2,395 Jul-15-2020, 05:42 PM
Last Post: maiya
  Create random pairs Dennisp44 3 8,099 Jun-02-2018, 05:51 AM
Last Post: buran

Forum Jump:

User Panel Messages

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