Python学习-12.Python的输入输出

在Python中,输出使用print函数,之前用过了。

输入的话,则使用input函数。

1 var = input()
2 print('you input is' + var)

输入haha则将输出you input is haha。

可见input的作用与C#中的Console.ReadLine方法一样。

posted @ 2014-09-27 16:58  h82258652  阅读(204)  评论(0编辑  收藏  举报