1. 使用vim编辑代码:
1 #!/usr/bin/python2.7
2 #-*-coding:utf-8-*-
3 name = raw_input('请输入你的名字:')
4 print 'Hello,',name

 

直接运行hello.py:

$chmod a+x hello.py

./hello.py

 

或者 python hello.py

 

  2.命令交互模式

     输入python

   退出exit()

相关文章:

  • 2021-10-24
猜你喜欢
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-05-04
  • 2021-12-07
  • 2021-05-22
相关资源
相似解决方案