Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to output random letters in python

import random
import string

def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
    return ''.join(random.choice(chars) for _ in range(size))


print(random_string_generator())

print(random_string_generator(size=50))
Source by www.codingforentrepreneurs.com #
 
PREVIOUS NEXT
Tagged: #output #random #letters #python
ADD COMMENT
Topic
Name
1+6 =