dannybunkins
12-04-2005, 02:55 PM
Hello all, I am working on a python program in which I assign a string to a list, and then am required to print that string randomized in a normal format. here is an example
#this will print "hello" randomized
>>>print random.shuffle(myList)
[o, h, l, e, l]
I want it to do this instead
#this will print "hello" randomized
>>>print random.shuffle(myList)
ohlel
I dont want the brackets or the commas, if there is a quick way built into python to do this, I would be greately appreciative is you told me, or at least pointed me to a tutorial or website that I could find out how to do this.
hopefully this is clear, if it is not please post back and tell me what I need to explain.
#this will print "hello" randomized
>>>print random.shuffle(myList)
[o, h, l, e, l]
I want it to do this instead
#this will print "hello" randomized
>>>print random.shuffle(myList)
ohlel
I dont want the brackets or the commas, if there is a quick way built into python to do this, I would be greately appreciative is you told me, or at least pointed me to a tutorial or website that I could find out how to do this.
hopefully this is clear, if it is not please post back and tell me what I need to explain.