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.
16 lines
308 B
16 lines
308 B
import random
|
|
|
|
words_list = ['sdf', 'asd', 'fds', 'zxc', 'fasd', 'wef', 'few', 'ewfd', 'gsg', 'fefs', 'fxce']
|
|
|
|
aList = [random.choice(words_list) for _ in range(1000)]
|
|
|
|
b_dict = dict()
|
|
|
|
for w in aList:
|
|
b_dict[w] = b_dict.get(w, 0) + 1
|
|
|
|
for k, v in b_dict.items():
|
|
print("{}:{} times".format(k, v))
|
|
|
|
|