# -*- coding: utf-8 -*-
name = raw_input()
print("I am "+name+" and I am studying Python in Nowcoder!")
- 输入汉字,需要声明:
# -*- coding: utf-8 -*-
- Python2 输入内容为字符,需要用raw_input, 不能用input(), Python3 可以
name = raw_input()
- 输出结果:
# -*- coding: utf-8 -*-
name = raw_input()
print("I am "+name+" and I am studying Python in Nowcoder!")
# -*- coding: utf-8 -*-
name = raw_input()