码迷,mamicode.com
首页 >  
搜索关键字:dict    ( 5061个结果
json.dumps、json.loads以及jsonpath解释举例
json.dumps :把字典转换成字符串 #在python中字典就是json对象 import jsonstr_dict={"name":"xiaoming","age":"18"} #json.dumps :把字典转换成字符串 str1=json.dumps(str_dict) print(ty ...
分类:Web程序   时间:2021-06-19 18:52:06    阅读次数:0
TcpIp
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net.Sockets; using Sy ...
分类:其他好文   时间:2021-06-16 18:02:41    阅读次数:0
python基础:数据类型,list,tuple,dict,set
写在前边: list和tuple都是有序的,取值方式如list[1],tuple[1]。 list列表,是一种可变序列 tuple元组,是一种不可变序列,初始化后就不能修改 dict和set都是无序的。 dict字典,等同于map。dict存储键值对,如dict1 = {"key":"value"} ...
分类:编程语言   时间:2021-06-15 18:53:57    阅读次数:0
Python 不可变数据类型
1 可变数据类型:字典dict、列表list、集合set 2 不可变数据类型:字符串string、元组tuple 3 数字:整数int、小数float、布尔bool 3.1 随机数 3.1.1 默认输出0到1之间的数: 1 import random 2 print(random.random()) ...
分类:编程语言   时间:2021-06-11 18:21:34    阅读次数:0
其他(handel_jsonl-format_date)
其他: 1 处理jsonl文件 #!\Users\Local\Programs\Python37 # -*- coding: utf-8 -*- import json def save_data_jsonl(data_dict_list,path="./new_id_source.jsonl"): ...
分类:Web程序   时间:2021-06-02 18:34:04    阅读次数:0
python中字典生成式
先看一个简单的字典生成式: 1 columns=[1,2,3,4] 2 3 new_dict={c:1 for c in columns} 4 5 print(new_dict) 结果是:{1: 1, 2: 1, 3: 1, 4: 1} ...
分类:编程语言   时间:2021-05-24 16:39:55    阅读次数:0
python内置函数
# print()# input()# len()# type()# int()# str()# list()# tuple()# dict()# set()# float()# id() # avg = sum(l) / len(l) #计算平均值# print(avg)# print( max( ...
分类:编程语言   时间:2021-05-24 13:23:00    阅读次数:0
Unit4 Talking about your TV viewing habits
##General English:7 ###Unit4 Talking about your TV viewing habits ###Vocabulary documentary a television documentary about/on the future of nuclear po ...
分类:Windows程序   时间:2021-05-24 09:58:59    阅读次数:0
字典根据key或者value排序
例: 根据value值排序 hasd = { 'a': 12, 'c': 7, 'd': 17, 'm': -9 } demo_dict = sorted(hasd.items(),key=lambda x:x[1]) print(demo_dict)[('m', -9), ('c', 7), (' ...
分类:编程语言   时间:2021-05-24 08:51:54    阅读次数:0
@Bean注解和@Scope注解以及@Scope的代理模式
参考资料: 1、Spring系列之bean的作用域、@Scope注解与proxyMode属性,https://blog.csdn.net/qq_32077121/article/details/107805007(讲解了Scope中代理模式的原理,重点理解) 2、spring aop 源码分析(三) ...
分类:其他好文   时间:2021-05-24 06:11:26    阅读次数:0
5061条   上一页 1 2 3 4 ... 507 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!