leetcode - 647. Palindromic Substrings
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they consist
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they consist
用过linux,确实感受到了命令行的强大,虽然古老悠久,但是熟练之后,效率确实高,无奈电脑安装ubuntu的兼容性不好,还是老老实实用windows 三步走: 1231.下载Git(https://git-scm.com/download/win),推荐便携版,下载cmder(http://cmder.net/),有带git和不带git两种版本2.解压3.配置环境变量 注:可以将cmder的快捷
最近,开始学习mysql,按照网站的教程,遇到各种坑,不知道是教程讲的原因还是我理解有问题,不过经过一番摸索还是解决了,到https://dev.mysql.com/downloads/mysql/下载最新版mysql(当前最新版mysql-8.0.13-winx64.zip),下载后解压到你想放置的文件夹,在文件夹内新建my.ini填入一下内容(根据你的路径修改) 12345678910[my
12345x = {'a':1, 'b':2}y = {'b':3, 'd':4}z = {**x, **y} # 如果有重复键值,则取最后一次的键值对print(z) # {'a': 1, 'b': 3, 'd': 4}
123456789101112# lcut即list cut,返回切分之后的结果列表jieba.lcut('人生苦短我用Python') # 精确模式 # 全模式,返回所有可能的结果jieba.lcut('人生苦短我用Python', cut_all=True)# 搜索引擎模式,结果利于搜索引擎的搜索jieba.lcut_for_search('人生苦短我用Python')# 向分词词典增加新词
123456789101112# 作用:递归遍历多层嵌套列表内的值到一个列表# yield from iterable本质上等于for item in iterable: yield item的缩写版,yield from的作用对象是iterabledef recursive(ns): # if type(ns) is list: if isinstance(ns, list):