笨方法学python-class 10 input
来源:互联网 发布:工业企业利润数据 编辑:程序博客网 时间:2024/06/11 11:36
print "how old are you?",
age = raw_input()print "How tall are you ?",height = raw_input()print "How much do you weigh?",weight = raw_input()print "so, you are %r old, %r tall and %r heavy." %(age,height,weight)
本篇是最简单的输入学习,值得注意的几点:
1. 每一行的print语句后面均有逗号,如果删掉逗号,执行后输入数据会显示在下一行。
2. raw_input 用法: 一、raw_intput 直接读取控制台输入内容,input 则要求输入内容符合Python语法,比如字符串,input()需要用双引号包围输入字符串
二、 raw_input 的输入内容直接被当做字符串处理,input 则不一定,可直接被识别数据类型。
0 0
- 笨方法学python-class 10 input
- class,类的详解, python, 笨方法学python
- 笨方法学python(ex1-17)--%,input,解包,读取,写文件
- 菜鸟学 Python-Class
- 笨方法学Python(6-10)
- 《笨方法学python》-2
- 《笨方法学python》-3
- 《笨方法学python》-4
- 笨方法学python 15
- python, del[] 用法, 笨方法学python
- python中的input方法
- 《笨办法学 Python》 学习笔记05 —— Class
- 笨方法学Python 习题 10: 那是什么?
- 笨方法学python 习题9、10、11
- 零基础学python-2.2 输入 input()
- class, 类,方法,python
- 笨方法学Python 习题 3: 数字和数学计算
- 《笨方法学Python》学习笔记
- Ajax 学习笔记
- com.genuitec.runtime.generic.jee70 is not defined
- mui.prompt怎么指定弹出框输入内容是input的类型,原始的type=text,
- python函数的参数定义和可变参数
- rpc
- 笨方法学python-class 10 input
- the content of element type must match解决方法
- mysql与oracle 表字段定义比较
- git 命令整理
- 接口与抽象类
- Volly的简单封装
- SpannableStringBuilder 同时设置setclickspan 和 ForegroundColorSpan出现问题
- 数据结构 第五章 数和二叉树
- 数据科学家的修行之路---基本功