I want to create a random list of names from a from a bigger list of names. The problem is, there is no space between the names that are generated. I cannot understand how to put space. Here's my code
import random
final_list = ""
a=0
sss = ("John","Adam","Sara","Lory","Dick","Popeye")
while a<7:
x = random.choice(sss)
final_list += x
a += 1
print (final_list)
The result is something like this: SaraAdamDickPopeyeSaraPopeyeLory
How can I add space between the names? Also, can anyone suggest a shorter way to do this code?