kgbonme Posted August 1, 2011 Report Share Posted August 1, 2011 salut,am un script in python si vreau sa stiu cum generezi random strings mai multe info pe private msk Quote Link to comment Share on other sites More sharing options...
cmiN Posted August 1, 2011 Report Share Posted August 1, 2011 Daca iti trebuie ceva gen session id poti face:from time import timefrom hashlib import md5md5(str(time())).hexdigest()Sau daca vrei siruri la nimereala de diferite lungimi poti implementa o functie ca:from random import randintrandstr = lambda length: "".join([chr(randint(97, 122)) for i in range(length)])randstr(32) -> 'uccaopwqczuuadiqzkuztfzcrodhppyw'randstr(32) -> 'whjvtopzkxexfzblrclgkrxhrvsiuisx' Quote Link to comment Share on other sites More sharing options...