python学习笔记8
2015-08-27 21:26
731 查看
主要讲了python的输入和输出
python通过[python2.x]raw_input和[python3.x]input来实现输入输出。
input可以加参数,表示为提示符,返回值为你的输入。
比如:
How old are you?12
your age is %s 12
print可以通过end参数去除输出末尾的回车,换上end="??"中赋的末尾符号
比如:
How old are you?: 23
your age is %s 23
python通过[python2.x]raw_input和[python3.x]input来实现输入输出。
input可以加参数,表示为提示符,返回值为你的输入。
比如:
age = input("How old are you?") print ("your age is %s", age)
How old are you?12
your age is %s 12
print可以通过end参数去除输出末尾的回车,换上end="??"中赋的末尾符号
比如:
print ("How old are you?", end=": ") age = input(); print ("your age is %s", age)
How old are you?: 23
your age is %s 23
相关文章推荐
- Python 日志(logging)模块
- python if条件判断、for循环和while循环
- python爬虫爬取csdn博客专家所有博客内容
- 基于七牛Python SDK写的一个批量下载脚本
- QtCreator 3.x gdb python支持
- The Python Challenge 0~2
- 小甲鱼Python第十二讲课后题
- python 序列类型以及list(列表) 和 tuple(元组)详解 以及range的用法
- Python语法基础——关于全局变量与局部变量
- 几个Python科学计算发行版
- python copy and deeepcopy
- python---序列可使用的内建函数(BIFs)
- python 格式化
- 为Python添加默认模块搜索路径
- python 高级属性
- 小甲鱼Python第十讲课后题
- python菜鸟日记9
- 正则表达式与python中re模块
- PEP8 Python 编码规范整理
- 小甲鱼Python第九讲课后题