alphanumeric list

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Tue Mar 15 04:44:53 EDT 2011


yqyq22 wrote:
> I would like to put an alphanumeric string like this one
> EE472A86441AF2E629DE360 in a list, then iterate inside the entire
> string lenght and change each digit with a random digit.

What does "change each digit with a random digit"? Do you want to swap two
random elements of the sequence with each other? The "random" module
contains a tool to generate random permutations, all you would have to do
is to split the string into a list, call that function and later join the
results.

Uli

-- 
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list