Python中常用的其它基本操作
2017-11-22 20:21
183 查看
#要用户手动输入数字或字符串
num = input( "please input the num\n" )
str = raw_input( "please input the str\n" )
nums = map( int , raw_input().split() )
#记录运行时间
import time
start = time.clock()
......
end = time.clock()
print('Running time: %s Seconds'%(end-start))
#判断字母大小写,全是大写则为1
str.isupper()
num = input( "please input the num\n" )
str = raw_input( "please input the str\n" )
nums = map( int , raw_input().split() )
#记录运行时间
import time
start = time.clock()
......
end = time.clock()
print('Running time: %s Seconds'%(end-start))
#判断字母大小写,全是大写则为1
str.isupper()
相关文章推荐
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python SQLAlchemy基本操作和常用技巧
- Python SQLAlchemy基本操作和常用技巧(包含大量实例,非常好)
- 转--Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python SQLAlchemy基本操作和常用技巧
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python SQLAlchemy基本操作和常用技巧(包含大量实例,非常好)
- Python SQLAlchemy基本操作和常用技巧(包含大量实例,非常好)
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python入门教程3. 列表基本操作【定义、运算、常用函数】[原创]_python_脚本之家
- Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- Python入门教程2. 字符串基本操作【运算、格式化输出、常用函数】[原创]_python_脚本之家
- [转载] Python 列表(list)、字典(dict)、字符串(string)常用基本操作小结
- python selenium常用基本方法---H5和键盘鼠标操作