@valoro/

palabras_random_1

Python

https://altocodigo.blogspot.com/2018/08/generar-y-ordenar-palabras-en-python.html

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8721682640368593","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJhbmRvbQpmcmFzZT1bXQpMPWxpc3QoJ2FiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6JykKZm9yIGkgaW4gcmFuZ2UoMCwxMSk6CiAgcD0nJwogIGZvciBqIGluIHJhbmdlKDQpOgogICAgcCs9TFtyYW5kb20ucmFuZGludCgwLDI1KV0KICBmcmFzZS5hcHBlbmQoJycuam9pbihwKSkKcHJpbnQoZnJhc2UpCnByaW50KHNvcnRlZChmcmFzZSkp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
import random
frase=[]
L=list('abcdefghijklmnopqrstuvwxyz')
for i in range(0,11):
  p=''
  for j in range(4):
    p+=L[random.randint(0,25)]
  frase.append(''.join(p))
print(frase)
print(sorted(frase))