码迷,mamicode.com
首页 >  
搜索关键字:python输入    ( 167个结果
python 输入 小结
Python 2 中的输入小结 1.raw_input(prompt = None)与input(prompt = None) 两个都是默认参数类型,这个参数可以传入一个字符串,用于输入的时候进行输出,例如 input会假定用户输入的都是合法的python 表达式,因此会尝试计算该表达式的值,inp ...
分类:编程语言   时间:2017-01-01 23:39:32    阅读次数:260
Python168的学习笔记3
list.extend(),可以拓展list,a=(0,1),b=(2,3) a.extend(b),a就变成(0,1,2,3) 分割字符串(除去字符串中的,\/;之类的),如果用str.split(),默认是除去空格,然后返回处理过后的list,可以输入特定值如split(';'),但缺点是一次只 ...
分类:编程语言   时间:2016-11-06 01:53:27    阅读次数:194
python 7 输入/输出
摘自: http://www.cnblogs.com/known/archive/2010/09/08/1821792.html 1. input and output 2. 处理文件 ...
分类:编程语言   时间:2016-10-16 19:23:21    阅读次数:104
python学习之输入输出,if,while,for,简单的turtle使用
python输入方式:username=raw_input("what‘syourname") message=raw_input("message") whilemessage!="exit": print(username+":"+message) message=raw_input("Enteramessage")结果显示:=================RESTART:/home/xiaozhi/Python/Raw_Input.py=================what‘s..
分类:编程语言   时间:2016-10-10 02:17:12    阅读次数:442
python--输入一组无序的数,排序
N=int(raw_input('input the number N='))number=[]while(N): m=int(raw_input('input..\n')) number.append(m) N -=1print numberfor i in range (0,len(number ...
分类:编程语言   时间:2016-08-10 12:42:36    阅读次数:297
Python --Anaconda、Jupyter、Matplotlib
Python 科学计算器--Anaconda 安装anaconda bash Anaconda.XXX.XXXX.sh 安装Jupyter pip install jupyter python输入 ~/.local/bin/jupyter-notebook --ip=192.168.1.111 -- ...
分类:编程语言   时间:2016-08-09 22:18:44    阅读次数:406
Python输入输出
1第一个Python[root@daidaipython]#catcalc.pyprint(100+200+300)[root@daidaipython]#pythoncalc.py600[root@daidaipython]#cathello.pyprint(‘hello,world‘)[root@daidaipython]#pythonhello.pyhello,world[root@daidaipython]#cathello.py#!/usr/bin/pythonprint(‘hello,wor..
分类:编程语言   时间:2016-07-03 23:31:32    阅读次数:237
登录程序
#!/usr/bin/env python'''1.输入用户名密码2.认证成功后显示欢迎信息3.输错三次后锁定(锁定以后不能登录)user.txt 存放被锁定用户'''n = 0user_passwd = {'a':'11','b':'22','c':'33'} #创建存放用户名密码的字典with ...
分类:其他好文   时间:2016-06-30 12:19:05    阅读次数:148
Python3(三)
Python 模块 Python 输入和输出 代码区: ...
分类:编程语言   时间:2016-06-27 15:12:21    阅读次数:232
Python输入和输出
在很多时候,你会想要让你的程序与用户(可能是你自己)交互。你会从用户那里得到输入,然后打印一些结果。我们可以分别使用raw_input和print语句来完成这些功能。对于输出,你也可以使用多种多样的str(字符串)类。例如,你能够使用rjust方法来得到一个按一定宽度右对齐的字符串。利用help(s...
分类:编程语言   时间:2016-01-12 11:31:47    阅读次数:151
167条   上一页 1 ... 13 14 15 16 17 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!