E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
raw_input()
python 变量拼写检查一例
myInput=
raw_input
('Identifiertotest?'
qingchn
·
2012-11-22 15:00
PAT1001 A+B Format
1000000=1000:fun(num/1000)sys.stdout.write(",%03d"%(num%1000))else:sys.stdout.write(num)deftest():str=
raw_input
iteye_7173
·
2012-11-17 23:17
PAT
PAT
python input 与
raw_input
函数的区别
以前没有深入考虑过
raw_input
与input函数的区别,所以一直比较困惑,今天测试之后,有了较为深入了解,记录如下>>>user=
raw_input
("Enteryourname:")Enteryourname
liangtee
·
2012-11-16 18:00
python
input
raw_input
python 列表
最大值和最小值索引从0开始递增,获取元素用变量去索引Greeting=‘hello’Greeting[0]=’h’字符串直接索引>>>'hello'[2]'l'用函数去索引就直接针对结果操作>>>g=
raw_input
贾平
·
2012-11-13 16:00
CF水题四道
/usr/bin/envpython importmath n,m,a=map(int,
raw_input
().split()) printint(math.ceil(n*1.0/a)*math.ceil
tclh123
·
2012-11-13 03:00
python scp 批量传文件
/usr/bin/python import pexpect import getpass remote_path=
raw_input
('remote_path: ') local_file=
raw_input
doufu300
·
2012-11-12 17:32
python
scp
python
python scp 批量传文件
/usr/bin/python import pexpect import getpass remote_path=
raw_input
('remote_path: ') local_file
doufu300
·
2012-11-12 17:32
python
scp
python scp传文件
/usr/bin/python import pexpect import getpass host=
raw_input
('hostname: ') remote_path=
raw_input
('remote_path
doufu300
·
2012-11-08 17:45
python
scp
python
python scp传文件
/usr/bin/python import pexpect import getpass host=
raw_input
('hostname: ') remote_path=
raw_input
doufu300
·
2012-11-08 17:45
python
scp
python3.2 input字符串问题
python3.2没有
raw_input
函数 name=input("whatisyourname?\n") print("Hello,"+name+"!")
Durian_2012
·
2012-11-07 20:00
python
input
raw_input
Debian Linux下的Python学习——控制流
1.if语句用法( if..elif..else) 代码: 运行: 注意:
raw_input
函数要求输入一个字符串,int把这个字符串转换为整数2.for语句用法(for...else) 代码
·
2012-10-30 11:00
python
SPOJ 42. Adding Reversed Numbers
/usr/bin/envpython n=input() whilen: n-=1 a,b=
raw_input
().split() printstr(int(a[::-1])+int(b[::-1])
tclh123
·
2012-10-28 16:00
用python写acm / SPOJ - 1
/usr/bin/envpython #-*-coding:utf-8-*- importsys defRint(): returnmap(int,
raw_input
().split()) a=Ri
tclh123
·
2012-10-28 06:00
python基础例子--菜单项
---菜单项whileTrue: print"--------------" print"1、取5个数的和" print"2、取5个数的平均值" print"X、退出" it=
raw_input
体验巅峰
·
2012-10-22 16:30
python练习
菜单项
python 求N以内的所有的质数
=2 whilei
raw_input
thinkmay
·
2012-10-19 23:00
Python 基础语法知识(二)
四.input读取输入值在Python2.x版本中,使用
raw_input
,但是到了Python3.x,转变成input,帮助文档对该方法的说明如下:input([prompt])Ifthepromptargumentispresent
bj学无止境
·
2012-10-12 13:39
python
基础
语法
python简单的使用(二)
Python中的错误检测前面已经知道了input()和
raw_input
()的用法了,input()会在接收了“字符串”的输入之后进行一些处理,比如你是输入1+2,然后输出的就是3了,而
raw_input
shiyuezhong
·
2012-09-22 20:00
python
list
File
Module
Class
input
《head first python》读书笔记
1、python3.2将print,input作为输出,输入,取消了
raw_input
()。
wddqing
·
2012-09-22 11:00
python
python中input和
raw_input
的区别
input和
raw_input
都可以读取控制台的输入,但input和
raw_input
在处理数字时是有区别的1)当输入为纯数字时input返回的是数值类型,如int,floatraw_inpout返回的是字符串类型
浮云暖
·
2012-09-19 16:47
字符串
python
表达式
的
是
python控制流
1、if控制流#-*-coding:utf-8-*-num=int(
raw_input
('请输入数字:'))number=12ifnumber==num: print'两个相等'elifnumber
游造
·
2012-09-13 13:33
python
简单控制流
Python笔记
Python笔记Tutorial: http://www.tutorialspoint.com/python/python_files_io.htm PythonIO输出printstr=
raw_input
I believe
·
2012-09-09 14:00
Python
raw_input
和input总结 在版本2和版本3中的区别
>>>user=
raw_input
("pleaseinput:")pleaseinput:wei#raw_input输入
萝卜_坑
·
2012-09-07 14:37
学习笔记总结
Python
raw_input
和input总结 在版本2和版本3中的区别
>>>user=
raw_input
("pleaseinput:") pleaseinput:wei#raw_inp
cvTingWei
·
2012-09-07 14:00
linux
python
String
user
File
input
python学习笔记(一):文件操作
/user/bin/env/python'''Pleaseinputthefilename'''filename=
raw_input
("PleaseinputthefileName:")importosifos.path.exists
CHINAonlyQiu
·
2012-09-05 16:00
python
String
File
input
import
Python学习日记-1
*使用input和
raw_input
都可以读取控制台的输入,但是input和
raw_input
在处理数字时是有区别的。1.当输入为纯数字时,Input返回的是数值类型,如int,float。
kimihiro89
·
2012-09-02 08:29
python
输入文件路径,统计文件行数
#-*-coding:utf-8- #输入一个文件名,读取文件,并显示文件行数filepath=
raw_input
('Enterafilepath:>>')file=open(filepath
shao
·
2012-08-20 14:00
python 读取文件的前几行
#-*-coding:utf-8-'''Createdon2012-8-20@author:shaolei'''#输入数字N和文件名F,显示文件F的前N行内容#提示用户输入要读取文件前几行N=int(
raw_input
shao
·
2012-08-20 13:00
python
读取文件
文本文件读写
/usr/bin/env python import os ls = os.linesep fname =
raw_input
('input a file name:') #get filename
xiangjie88
·
2012-08-11 13:00
文件读写
Python 积沙成塔
1、关于
raw_input
()内建函数
raw_input
()内建函数接收用户的标准输入数据并把它赋值给指定的变量,我们需要注意的是
raw_input
()把获取到得数据以字符(串)的形式赋值给变量,如我们要取得数值必须用
lhyhr
·
2012-08-09 15:00
Python_ValueError:need more than 1 value to unpack
%user_namelikes=
raw_input
(prompt)print"Wheredoyou
jiguanghoverli
·
2012-08-08 23:00
python
user
input
import
程序输入和 内建函数
raw_input
《Python核心编程》从用户那里得到数据输入的最容易的方法是使用
raw_input
()内建函数。它读取标准输入,并将读取到的数据赋值给指定的变量。
木之四月
·
2012-08-07 23:00
python termios
来自:Python-CNGroup:http://groups.google.com/group/python-cn/browse_thread/thread/bb729a571cd3b091#Q:#
raw_input
木之四月
·
2012-08-07 23:00
[置顶] python 异常处理
>>>s=
raw_input
('Entersomething-->') Entersomething-->Traceback(mostrecentcalllast): File"",line1,in?
qustdjx
·
2012-08-07 11:00
exception
工作
python
File
input
[置顶] python 输入输出文件
简明Python教程Swaroop,C.H.著沈洁元 译我们可以分别使用
raw_input
和print语句来完成这些功能。对于输出,你也可以使用多种多样的str(字符串)类。
qustdjx
·
2012-08-07 10:00
apple
python
object
File
fun
newline
python语言入门
.python可以这么赋值x,y,z=5,4,34.lambda就是一个匿名函数对象,使用方法如:b=filter(lambdax:notx%2,a)将列表a里的素数拷贝到b中5.输入使用input和
raw_input
lalor
·
2012-08-05 13:00
python
object
File
input
语言
import
入门知识
__name__的值为模块名,如果是被直接执行的话,那就会是__main__3.变量无需声明,可直接使用4.利用exec和eval可以直接执行镶嵌在程序内部的字符串代码,就是说直接使用eval和和一个
raw_input
jiejiaozhufu
·
2012-07-31 11:00
python
python input 与
raw_input
函数的区别
以前没有深入考虑过
raw_input
与input函数的区别,所以一直比较困惑,今天测试之后,有了较为深入了解,记录如下 >>>user=
raw_input
("Enteryourname:")Enteryourname
sruru
·
2012-07-26 18:00
python
String
user
File
Module
input
属 性
属性:与数据有关的项目,可以是简单的数据值,也可以是可执行对象,比如函数和方法.object.attribute fileName=
raw_input
('enterafilename:') file
xiangjie88
·
2012-07-25 22:00
快速入门
下划线(_)在解释器中表示最后一个表达式的值
raw_input
user =
raw_input
('Enter login name:') print 'you login is:%s'
xiangjie88
·
2012-07-24 22:00
快速入门
python 学习记录(4)—本金+利息计算及简单的游戏猜测程序
filename:interest_calculation.pyprint'''hello,welcometousethisinterestcalculationprogram\n'''principal=int(
raw_input
julius_lee
·
2012-07-05 16:00
Python,how do you work (三)
主要使用try...except 语句来进行的 import sys try: s =
raw_input
('Enter something
chenhailong
·
2012-07-03 13:00
python
Learn Python The Hard Way学习(35) - 分支和函数
" next =
raw_input
("> ")
webcode
·
2012-07-02 15:00
python
windows下运行python的
raw_input
()语句
问题:对初学者来说,在windows下,写好一个*.py脚本后,可能会直接双击文件,但是文件弹出黑框后一闪而过解决:在脚本下加入
raw_input
()语句,如双击*.py后的结果为:适用的环境:1.windows
wudiyi815
·
2012-06-29 16:00
windows
python
脚本
input
Python 猜价格游戏:while 结合 if学习使用(2)
/usr/bin/python #Filename:index.py price=230#设定价格 running=True whilerunning: guess=int(
raw_input
('请输入产品价格
grassroots2011
·
2012-06-28 23:00
Python 猜价格游戏:if学习使用(1)
/usr/bin/python #Filename:index.py price=230 guess=int(
raw_input
('请输入产品价格:')) ifguess==price: print'主持人
grassroots2011
·
2012-06-28 23:00
游戏
python
input
产品
Learn Python The Hard Way学习(12) - 输入提示
raw_input
()的括号中可以添加文本,起到提示用户输入内容的作用。比如:y=
raw_input
("Name?")"Name?"是提示,用户的输入会保存到变量y中,就像你问别人问题,然后得到答案。
lixiang0522
·
2012-06-18 15:00
windows
python
浏览器
File
文档
input
Learn Python The Hard Way学习(11) - 提问
, age=
raw_input
() print"How
lixiang0522
·
2012-06-18 15:00
python
input
python 学习1阶段 编写简单乘法运算
importsysimportrandomrunning=Truewhilerunning:a=random.randint(0,30)b=random.randint(0,20)printa,'*',bhe=a*bgauess=int(
raw_input
20jianxy11
·
2012-06-17 16:46
python
学习
Python简单抓取新浪某网页新闻链接及标题
自行输入时间(貌似都一样,正则还是可以用) #doc=urlopen("http://roll.tech.sina.com.cn/tele/2012-05-01.shtml").read() newsYear=
raw_input
BetaBin
·
2012-06-14 01:00
exception
python
url
input
email
import
python(贪吃蛇)
Python常见的语句和c#中的语句概念差不多,不过就是else的用法比较奇特,break和continue也差不多输入语句Pythonc##读取输入的内容myvalue=
raw_input
(u"输入一个数字
·
2012-06-03 09:00
python
上一页
39
40
41
42
43
44
45
46
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他