this function will not give me an output when tested in python's IDLE:
import random
def scramble(string):
rlist = []
while len(rlist) < len(string):
n = random.randint(0, len(string) - 1)
if rlist.count(string[n]) < string.count(string[n]):
rlist += string[n]
rstring = str(rlist)
return rstring
scramble('sdfa')
I've spent a long time trying to figure out the problem, but the code seems good to me.