Linked Questions

24 votes
2 answers
44k views

Possible Duplicate: python random string generation with upper case letters and digits How do I generate a String of length X a-z in Python?
TIMEX's user avatar
  • 275k
5 votes
2 answers
21k views

Possible Duplicate: python random string generation with upper case letters and digits I need to create a random string that is 8 bytes long in python. rand_string = ? How do I do that? Thanks
Tampa's user avatar
  • 78.8k
2 votes
6 answers
20k views

I just want to ask that like taking random number from: Random.randint(a, b) I just want to ask that how to take random string just like randint but this time with random string. Is there anyway? #...
M. Husnain's user avatar
1 vote
2 answers
1k views

Is there any module in Python for generating random strings but to be unique ? I need to generate keys like for example when installing Windows.
Damir's user avatar
  • 56.7k
2 votes
3 answers
6k views

I wanted to know how to print a random string in Python. I want this to be a random string like "ayhbygb", and be a random amount of letters long. So like, one time it could print "a", the next time ...
Hugh Chalmers Advanced's user avatar
0 votes
2 answers
1k views

I would like to generate a list of random numbers and letters. I managed to make this: def rand_num(): while True: random_char= random.choice(string.ascii_letters+string.digits) ...
Smeagol2's user avatar
  • 313
-4 votes
1 answer
2k views

After a lot of searching and fails and lot of stress for being dumb, I am gonna to ask, how to build a wordlist generator in python? My case letters and numbers to use (abcdef0123456789) length (72 ...
Julio Cezar's user avatar
0 votes
2 answers
859 views

I have a function which returns a string of size N containing a random sequence of characters form a small set {A,B,C,D}. I generate this line as: def gen_line(N): tline = "" for i in range(N): ...
drjrm3's user avatar
  • 4,788
0 votes
1 answer
1k views

I am creating a tracking app for projects where each project will have one or more groups. I want to add an alphanumeric string as the unique identifier (similar to the primary key) for groups. I know ...
Narendra Vishwakarma's user avatar
-1 votes
1 answer
364 views

I want to randomize the answers in my for loop. My current code only prints: AAA,BBB,CCC. while True: for i in range(65,91): answer = chr(i) + chr(i) + chr(i) print(answer) How ...
Nick's user avatar
  • 3
0 votes
0 answers
191 views

How does one generate integer of 8 length unique integers for CharField() I want to use this to generate barcode id Eg maybe a function? I have seen the uuid.uuid4 but it's too much for what I needed....
Onyilimba's user avatar
  • 1,215
0 votes
6 answers
251 views

My code looks like this: char = input('Characters: ') length = int(input('Length: ')) I want to make a length long string which uses randomly selected characters from the char variable. How can I do ...
hrantnonexistent's user avatar
0 votes
1 answer
60 views

Something incomprehensible when the code is executed, I don't know how to describe it, but the screenshot shows Code: symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" @client.event async def ...
369's user avatar
  • 37
0 votes
0 answers
28 views

I was wondering how you generate random strings in Python as opposed to random int's? How would I get around this? I recently tried to make a random string generator using random.randint() and using ...
Nikolas Brodeur-Amigo's user avatar
13112 votes
50 answers
3.5m views

What functionality does the yield keyword in Python provide? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and ...
Alex. S.'s user avatar
  • 148k

15 30 50 per page
1
2 3 4 5