I would like to call again the function to return a new list with 5 results of sampled_list. Thank you guys
import random
emoji_list = ['', '', '', '', '', '', '', '','', '', '', '', '', '', '', '', '', '','', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
sampled_list=random.sample(emoji_list, k=5)
def listToString(sampled_list):
# initialize an empty string
str1 = ""
# traverse in the string
for i in sampled_list:
str1 += i
# return string
return str1