牛客761340385号
牛客761340385号
全部文章
未归档
数据结构(7)
归档
标签
去牛客网
登录
/
注册
三分秋水
学习
全部文章
/ 未归档
(共53篇)
python-可变类型和不可变类型
Python
2020-02-02
0
385
python-split
默认分隔符是空格 >>> line='aaa bbb ccc' >>> cols=line.split() >>> cols ['aaa', 'bbb', 'ccc'] >>> 复制代码 其余在参数内 ...
Python
2020-02-02
0
635
Python-列表转换字符串方法-jion
>>> S='spammy' >>> L=list(S) >>> L ['s', 'p', 'a', 'm', 'm', 'y'] >>> L[3]='x' >>> L[4]='x' >>> ...
Python
2020-02-02
0
535
python-列表删除重复项使用集合
>>> l=[1,2,1,3,2,4,5] >>> set(l) {1, 2, 3, 4, 5} >>> l=list(set(l)) >>> l [1, 2, 3, 4, 5] >>> 复制代码
Python
2020-02-01
0
489
python-小数-分数-精度
>>> 0.1+0.1+0.1-0.3 5.551115123125783e-17 >>> from decimal import Decimal >>> Decimal('0.1')+Decimal('0.10')+Decimal('0.1...
Python
2020-02-01
0
640
python-进制转换
>>> oct(64),hex(64),bin(64) ('0o100', '0x40', '0b1000000') 复制代码 0o 8进制 0x 16进制 0b 2进制 int 函数,通过第二个参数确定进制 >>> int('64'...
Python
2020-02-01
0
556
python-整数截断(向上取整,向下取整)
import math math.floor(2.5) 2 math.floor(-2.5) -3 math.trunc(2.5) 2 math.trunc(-2.5) -2
Python
2020-02-01
0
816
Python-数据类型
整数和浮点数 复数 固定精度的十进制数 有理分数 集合 布尔类型 无穷的整数精度 各种数字内置函数和模块 Python 表达式操作符及程序
Python
2020-02-01
0
554
Python-字典嵌套
>>> rec {'name': {'first': 'Bob', 'last': 'Smith'}, 'job': ['dev', 'mgr'], 'age': 40.5} >>> rec['name'] {'first': 'Bob', 'last': 'Sm...
Python
2020-01-31
0
560
Python-列表解析
列表解析 list comprehension expression >>> M=[[1,2,3],[4,5,6],[7,8,9]] >>> M [[1, 2, 3], [4, 5, 6], [7, 8, 9]] >>> M[1]...
Python
2020-01-31
0
613
首页
上一页
1
2
3
4
5
6
下一页
末页