返回1-10平方的列表 [i ** 2 for i in range(1,11)] [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] 有一个列表[1,4,9,16,2,5,10,15]生成一个新的列表,要求新的列表是lst相邻2个元素之和 lst = [1,4,9,16, ...
分类:
其他好文 时间:
2020-04-07 22:35:11
阅读次数:
87
#流程控制结构/*顺序、分支、循环 */ #一、分支结构#1.if函数/*语法:if(条件,值1,值2)功能:实现双分支应用在begin end中或外面 */ #2.case结构/*语法:情况1:类似于switchcase 变量或表达式when 值1 then 语句1;when 值2 then 语句 ...
分类:
数据库 时间:
2020-04-07 20:17:58
阅读次数:
73
swith swith单运用 package com.struct;?public class SwitchDomn01 { public static void main(String[] args) { char grade = 'A'; //case穿透 //swith 匹配一个具体的值? s ...
分类:
其他好文 时间:
2020-04-07 18:25:06
阅读次数:
92
读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 1 #include<stdio.h> 2 int main(){ 3 char c; 4 int sumt=0,t[10],count,i; 5 scanf("%c",&c); 6 while(c!='\0'&&c!='\n' ...
分类:
其他好文 时间:
2020-04-07 11:07:46
阅读次数:
64
Given an array of strings, group anagrams together. Example: Note: All inputs will be in lowercase. The order of your output does not matter. 这道题就是用每个 ...
分类:
其他好文 时间:
2020-04-07 10:00:31
阅读次数:
94
import unittest from assertpy import assert_that """ Testcase: 一个TestCase的实例就是一个测试用例。什么是测试用例呢?就是一个完整的测试流程,包括测试前准备环境的搭建(setUp), 执行测试代码 (run),以及测试后环境的还原 ...
分类:
其他好文 时间:
2020-04-07 09:35:03
阅读次数:
75
来源: "Redux入门教程 阮一峰" "Redux中文文档" React Redux是Redux对于React的封装 UI组件 React Redux将所有的组件分为两大类,UI组件和容器组件。 UI组件将不带有任何逻辑,无状态,所有的参数由this.props提供且不使用Redux的API 例如 ...
分类:
其他好文 时间:
2020-04-07 00:16:23
阅读次数:
69
<script> var str = 'hello world' // 获取字符串的长度 console.log(str.length) // 获取下标为1的字符 console.log(str.charAt(1)) // 获取下标为1的字符的对应的编码 console.log(str.charCo ...
分类:
Web程序 时间:
2020-04-06 22:12:25
阅读次数:
100
1.条件判断 Python程序语言制定任何非0和非空(null)值为true,0或者null为false。' 其中"判断条件"成立时(非零),则执行后面的语句,而执行内容可以多行,以缩进来区分表示同一范围。条件不成立时,,执行else语句。 if语句 if 判断条件: 执行语句…… else: 执行 ...
分类:
编程语言 时间:
2020-04-06 15:21:30
阅读次数:
67
2-14课程和2-12重复了,所以没有发出来 1 方法引用使用条件 判断方法引用 是否满足场景的要求的时候,只需要看我们的出参和入参是否满足接口的要求即可 2 方法引用场景 四种方法引用类型: 指向静态方法 Class::staticMethod指向现有对象的实例方法 object::instanc ...
分类:
编程语言 时间:
2020-04-06 11:36:00
阅读次数:
153