chiami.py
name = input("Come ti chiami?")

type(name)
print(name) $ python chimi.py
 Come ti chimi? xxx
 Traceback (most recent call last):
     File "chimi.py", line 1, in <module>
         name = input("Come ti chiami?")
     File "<string>", line1, in <module>
 NameError: name 'xxx' is not defined.$ python --version
 Python 2.7.5replace input() with raw_input
#!/usr/bin/env python2
# -*- coding: utf-8 -*-

name = raw_input("Come ti chiami?")

print(type(name))
print(name)
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.