This is my code:
t=['']*20
slist=s1.split()
for i in range(20):
j=math.floor(random()*10)
for k in range(5):
t[i]=(slist[j])
print(t[i])
Basically t[i] is a list with a word in it and I want to add 5 random words from slist to t[i]. With just the equal sign it overwrites the word.
Also += or append doesn't seem to work in list. I know there are better methods out there but i wanna see if it can be done like this.