raw_input()
in python to get console input
In python's function raw_input(' ')
, can I put variables between single quotes?
For example
K = 'cat'
F = 'fish'
If I want to prompt "Cat eat fish", how should I write it?
The following wording should be wrong:
raw_input('K eat F')
Is there any way to introduce variables into the raw_input function?
If the raw_input
function is unable to implement this function, is there any other function to achieve this function, i.e. to get the console input, and the variable can be used in the prompt?