Let's say there are different variables such as x,y,z
x = "bla"
y = "blabla"
z = "blablabla"
I want to see just one of them randomly when I run the code, like welcome messages in Minecraft
How can I do it? Thanks in advance.
instead of x="" y="" z="" ... just make a list of the possible welcome messages.. These top 3 lines will do what you want.
#Import random module
#Make a list of the messages
x=["Welcome","Enter if you dare","Go away"]
#use random.choice() to print one
#Just for fun
#10 random picks from the list
for i in range(10):