python练习1

vim hello.py

#!/usr/local/bin/python3.4

str=input('pls intput same message:');
print('you had enterd the string:'+str);

运行:

 

vim hello.py

#!/usr/local/bin/python3.4

x='love hope';
print(x[3:7]);
print('hello,'+x*2+'-end.');

运行:

 

完。

posted @ 2015-05-12 14:37  liyou  阅读(136)  评论(0)    收藏  举报