直接看代碼吧,很簡單:
print('hello,world')
print('hello','world')
print('100 + 200 = ',100+200)
name = input()
print('hello,',name)
name = input('please enter your name ')
print('hello',name)
運行的時候是這樣:
V_XKANGFAN-MC10:lizi v_xkangfan$ python demo.py
hello,world
hello world
V_XKANGFAN-MC10:lizi v_xkangfan$ python demo.py
hello,world
hello world
100 + 200 = 300
fanxiaokang
hello, fanxiaokang
please enter your name fanxiaokang
hello fanxiaokang
很簡單,記住就好。