利用python解决问题的过程中,经常会遇到从某个对象中抽取部分值的情况。“切片”操作正是专门用于实现这一目标的有力武器。理论上,只要条件表达式得当,可以通过单次或多次切片操作实现任意目标值切取。切片操作的基本语法比较简单,但如果不彻底搞清楚内在逻辑,也极容易产生错误,而且这种错误有时隐蔽得较深,难 ...
分类:
编程语言 时间:
2020-03-18 15:52:48
阅读次数:
70
1.Worksheets("Sheet1").Range("A1").End(xlDown).Select '意思为自A1起,返回从上往下的最后一个非空单元格 此时返回的单元格是A2,写法也可以拆分: Worksheets("Sheet1").Range("A1").Select Selection ...
分类:
其他好文 时间:
2020-03-18 15:49:24
阅读次数:
192
### 内置函数 > 内置函数就是在系统安装完python解释器时,由python解释器给提供好的函数 ### [`range()`](https://docs.python.org/zh-cn/3.7/library/stdtypes.html#range) 函数 > 如果你确实需要遍历一个数字序 ...
分类:
编程语言 时间:
2020-03-18 11:42:43
阅读次数:
62
1 from turtle import* 2 seth(-120) 3 for i in range(3): 4 for i in range(3): 5 fd(100) 6 left(120) 7 left(60) 8 right(60) 9 fd(100) 10 seth(-60) 11 fo ...
分类:
其他好文 时间:
2020-03-17 19:45:25
阅读次数:
58
1 class Solution 2 { 3 public: 4 vector<int> searchRange(vector<int>& nums, int target) 5 { 6 auto it = find(nums.begin(),nums.end(),target); 7 if(it ...
分类:
编程语言 时间:
2020-03-17 19:31:11
阅读次数:
57
1 from turtle import* 2 n=eval(input()) 3 a=3 4 color("blue","yellow") 5 begin_fill() 6 for i in range(n-2): 7 circle(50,steps=a) 8 fd(50) 9 a=a+1 10 ...
分类:
其他好文 时间:
2020-03-17 19:14:32
阅读次数:
65
public class Tests2020031702 { private static String RANGE = "0123456789"; public static void main(String[] args) { // 1-8位随机组合 for (int len = 1; len ...
分类:
编程语言 时间:
2020-03-17 13:56:51
阅读次数:
57
检测单词是否是由颠倒字母组成的词 #检测单词是否是由颠倒字母组成的词 def anagram(s1,s2): num1=[0]*26 num2=[0]*26 for i in range(len(s1)): pos=ord(s1[i])-ord('a') num1[pos]+=1 for i in ...
分类:
编程语言 时间:
2020-03-16 23:44:19
阅读次数:
97
每一个output的值都有prob的概率被保留,如果保留=input/ prob,否则变为0 dropout相当于一个过滤层,tensorflow不仅丢弃部分input,同时将保留下的部分适量地增加以试图弥补梯度 1 inputs = tf.reshape(tf.range(40.), (2,4,5 ...
分类:
其他好文 时间:
2020-03-16 21:54:37
阅读次数:
57
1函数级别 import time import threading def sing(nums): for i in range(nums): print("唱歌") time.sleep(1) def dance(): for i in range(5): print("跳舞") time.sl ...
分类:
移动开发 时间:
2020-03-16 21:43:03
阅读次数:
98