I want user input to be joined to an item in an existing list
I tried formating the string in the list using %s
from random import randint
user_name = input("Name: ")
I want the %s to be the name the user input
my_list = ["Hello %s, nice to meet u",
"%s! what a wonderful name",
"welcome %s"]
for m in my_list:
print(randint(my_list)% user_name)
my output should be any of the items in the list accompanied by the user input i.e output: #Hello Mike, nice to meet u
where "Mike" is the user input
randint(my_list)does? You should trychoicefrom therandommodule instead.