mercredi 20 septembre 2017

Set Rules and Definitions for Making a Lambda Expression

I'm new to python and I would like to ask for help as to how to set definitions in creating a lambda expression. I made a random string generator but need more functions/definitions. Help?

import random
import string

num_char = random.randint(3, 10)

rand_var = ""
for i in range(num_char):
    rand_var += random.choice(string.ascii_lowercase)

rand_app = ""
for y in range(num_char):
    rand_app += random.choice((string.ascii_lowercase).join(string.ascii_lowercase))
print(("λ"+rand_var+"."+rand_app))




Aucun commentaire:

Enregistrer un commentaire