-3

I have searched but could not fond an answer. So i have

Mood = raw_input("How are you?")

How do I make it so it picks the raw question from a list so it could be 'how are you' are 'what are you feeling'

Bakuriu
  • 98,325
  • 22
  • 197
  • 231
  • No because its a input – user3729400 Jun 11 '14 at 15:53
  • 2
    But you don't have problem with input, you have problem with picking question from the list, and you should name your question accordingly. – Bunyk Jun 11 '14 at 15:55
  • Please don't write title as sequences of tags. `python - raw_input` doesn't mean anything. Use complete English sentences. Also there's already the python tag in the question, so you don't have to mention `python` in the title, and `raw_input` is completely irrelevant to what you want to achieve (you can replace it with anything and the question doesn't change). – Bakuriu Jun 12 '14 at 13:28

2 Answers2

2
import random
Mood = raw_input(random.choice(['how are you?', 'what are you feeling?']))
Bunyk
  • 7,635
  • 8
  • 47
  • 79
0

just index into the list

    ques = ['how are you?', 'what are you feeling?']

    ans = raw_input(ques[0])
gkusner
  • 1,244
  • 1
  • 11
  • 14