I'm very new to coding, so I apologize if the answer is very simple, but I'm currently trying to code a magic 8 ball game. I want the computer to give a random string from a list I made, to the user when they give an input. Here's the code I made so far:
import random
print("Welcome to the Magic 8 Ball Game!")
#Create phrases the maigc 8 ball will say to the user
phrases = ["Ask again", "Reply hazy, try again.", "I do see that in your near future...", "My sources say no", "Very possible", "Yes. Very soon."]
#Ask the user to ask a question to start the game
answer = input("The game has started. Ask a question.\n")
#Make a loop
for i in answer:
print(random.choice(phrases))
When I run the code, instead of giving a single string to the user, it'll randomly give out multiple strings. I think I might not be using the for loop correctly...