Netuším čo znamená ten "kód", ale ak to má čítať nejaký text z klávesnice potom:
Data Input
Print "prompt" to console and wait for string input ------raw_input("prompt")
Print "prompt" to console and wait for number input ------input("prompt")