• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

nunca

但行好事 莫问前程
  • 博客园
  • 联系
  • 订阅
  • 管理

公告

上一页 1 ··· 5 6 7 8 9 10 11 下一页

2018年3月28日

python中循环迭代问题

摘要: 在python中循环的初始值永远从0开始,不管前面如何赋值,如下代码: 虽然起初我们给 i 赋值 1,但是开始下面循环的时候,i 初值依然为0。 阅读全文

posted @ 2018-03-28 08:10 乐晓东随笔 阅读(206) 评论(0) 推荐(0)

2018年3月27日

ValueError: c of shape (1, 300) not acceptable as a color sequence for x with size 300, y with size 300

摘要: 报错如图所示 源码一般情况下,水平有限,不敢乱动,找到相应的报错路径,将代码 阅读全文

posted @ 2018-03-27 10:58 乐晓东随笔 阅读(3083) 评论(0) 推荐(0)

LeetCode Easy: 58. Length of Last Word

摘要: 一、题目 Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last 阅读全文

posted @ 2018-03-27 06:52 乐晓东随笔 阅读(145) 评论(0) 推荐(0)

python中的split方法

摘要: 参考:http://www.runoob.com/python/att-string-split.html Python split()通过指定分隔符对字符串进行切片,如果参数num 有指定值,则仅分隔 num 个子字符串 语法: 其中str -- 分隔符,默认所有的空字符串,包括空格、换行(\n) 阅读全文

posted @ 2018-03-27 06:47 乐晓东随笔 阅读(436) 评论(0) 推荐(0)

2018年3月26日

python中字典中的 get 方法

摘要: python中字典的使用非常普遍,字典也有很多方法,今天遇到了字典的get方法,用法如下: Python 字典(Dictionary) get() 函数返回指定键的值,如果值不在字典中返回默认值。 语法: key -- 字典中要查找的键。 default -- 如果指定键的值不存在时,返回该默认值值 阅读全文

posted @ 2018-03-26 17:36 乐晓东随笔 阅读(2664) 评论(0) 推荐(0)

LeetCode Easy: 53. Maximum Subarray

摘要: 一、题目 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4, 阅读全文

posted @ 2018-03-26 15:32 乐晓东随笔 阅读(164) 评论(0) 推荐(0)

python中的列表表达式(列表推导式)

摘要: python中有一中十分好用的功能:列表表达式或者列表推导式 目前先用到这么多,以后遇到再加 阅读全文

posted @ 2018-03-26 11:58 乐晓东随笔 阅读(1442) 评论(0) 推荐(0)

2018年3月25日

LeetCode Easy: 35. Search Insert Position

摘要: 一、题目 Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted 阅读全文

posted @ 2018-03-25 10:44 乐晓东随笔 阅读(144) 评论(0) 推荐(0)

LeetCode Easy: 38. Count and Say

摘要: 一、题目 The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as " 阅读全文

posted @ 2018-03-25 10:15 乐晓东随笔 阅读(146) 评论(0) 推荐(0)

2018年3月24日

LeetCode Easy: 28. Implement strStr()

摘要: 一、题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2 阅读全文

posted @ 2018-03-24 07:38 乐晓东随笔 阅读(133) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 下一页
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3