码迷,mamicode.com
首页 >  
搜索关键字:list dict 元组    ( 64336个结果
pug模板引擎(原jade)之 代码
不输出的代码 for 语句/ each语句 for (var x = 0; x < 3; x++) li item 编译为: <li>item</li> <li>item</li> <li>item</li> 写成块的形式 用 each var list = ["Uno", "Dos", "Tres ...
分类:其他好文   时间:2021-05-24 15:12:52    阅读次数:0
npm
npm config -h npm config list prefix 为 --globa 的安装路径 npm config edit 调用notepad编辑 npm ls npm list -g 全局模块 npm list recast ...
分类:其他好文   时间:2021-05-24 14:55:51    阅读次数:0
实验四
f = open(r'data6_1.txt') f1=open('data6_2.txt','w') a = list(f) a.sort(key=lambda x : x[8:]) a.reverse() for i in a: i=i.strip('\n') f1.write(''.join( ...
分类:其他好文   时间:2021-05-24 14:43:52    阅读次数:0
基于android自定义view写一个飞机大战
图: 懒得写解释了直接上代码: 代码: package chenlong.chenlong.viewstudy.myview; import android.content.Context; import android.graphics.Canvas; import android.graphic ...
分类:移动开发   时间:2021-05-24 14:36:13    阅读次数:0
后台获取的map集合封装json
let list = [] let arr = {'a':'1','b':'2','c':'3','d':'4'} for(var key in arr){ console.log("key:"+key+",value:"+arr[key]) list.push({ 'key':key, 'valu ...
分类:Web程序   时间:2021-05-24 14:32:47    阅读次数:0
1442. 形成两个异或相等数组的三元组数目
题目来源:1442. 形成两个异或相等数组的三元组数目 给你一个整数数组 arr 。 现需要从数组中取三个下标 i、j 和 k ,其中 (0 <= i < j <= k < arr.length) 。 a 和 b 定义如下: a = arr[i] ^ arr[i + 1] ^ ... ^ ...
分类:编程语言   时间:2021-05-24 14:31:19    阅读次数:0
Python中字符串转换列表
前言:在使用Python完成工作中一些任务的时候,常常要对数据类型进行转换,比如字符串转列表,列表转字符串,字符串转元组等等,下面分享一下常用的字符串转列表 字符串转列表 第一种字符串转列表: t_str="abc" 输出类型: print(type(t_str)) 结果: 输出类型:<class ...
分类:编程语言   时间:2021-05-24 14:19:22    阅读次数:0
Python collections
collections collections是Python内建的一个集合模块,提供了许多有用的集合类。 nametuple是一个函数,它用来创建一个自定义的tuple对象,并且规定了tuple元素的个数,并可以用属性而不是索引来引用tuple的某个元素。这样一来,我们用namedtuple可以很方 ...
分类:编程语言   时间:2021-05-24 14:16:35    阅读次数:0
实验四
with open('data1_1.txt', 'r', encoding = 'utf-8') as f: data=f.readlines()n = 0for line in data: if line.strip('\n') == '': continue n+=1print(f'共{n}行 ...
分类:其他好文   时间:2021-05-24 14:12:19    阅读次数:0
数据结构 03-树2 List Leaves (25 分)
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. Input Specification: Each input file contains one t ...
分类:其他好文   时间:2021-05-24 14:03:04    阅读次数:0
64336条   上一页 1 ... 25 26 27 28 29 ... 6434 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!