You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
p46ampy7v/str_and_generater.py

14 lines
361 B

import string
import random
import pprint
x = string.ascii_letters + string.digits
y = [["".join([random.choice(x) for _ in range(random.randint(1, 100))]) for _ in range(random.randint(1, 10))] for _ in range(50)]
def sort_ll(item):
item.sort(key = lambda x: len(x), reverse=True)
return len(item)
y.sort(key=sort_ll, reverse=True)
pprint.pprint(y)