Linked Questions
71 questions linked to/from Random string generation with upper case letters and digits
24
votes
2
answers
44k
views
How do I generate a random string (of length X, a-z only) in Python? [duplicate]
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?
5
votes
2
answers
21k
views
Python - how to create a random string 8 bytes long? [duplicate]
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
2
votes
6
answers
20k
views
How to generate random string? [duplicate]
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?
#...
1
vote
2
answers
1k
views
Is there any module in Python for generating random strings? [duplicate]
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.
2
votes
3
answers
6k
views
How to generate random strings that have variable length [duplicate]
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 ...
0
votes
2
answers
1k
views
How to make a list of random ASCII letters and digits? [duplicate]
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)
...
-4
votes
1
answer
2k
views
Wordlist generator in python [duplicate]
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 ...
0
votes
2
answers
859
views
Fast method to generate random string sequence [duplicate]
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):
...
0
votes
1
answer
1k
views
Generate unique Alphanumeric identifiers in django [duplicate]
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 ...
-1
votes
1
answer
364
views
Randomize characters in loop [duplicate]
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 ...
0
votes
0
answers
191
views
how to generate random integers with length 8 and unique [duplicate]
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....
0
votes
6
answers
251
views
How to create random string using user-inputted characters (Python 3) [duplicate]
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 ...
0
votes
1
answer
60
views
Incorrect code execution (extra text) Discord.py [duplicate]
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 ...
0
votes
0
answers
28
views
How do I generate random strings in python? [duplicate]
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 ...
13112
votes
50
answers
3.5m
views
What does the "yield" keyword do in Python?
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 ...