先看看列表里的__setslice__方法函数的帮助文档
help(list.__setslice__)
帮助文档如下所示:
__setslice__(...)
x.__setslice__(i, j, y) x[i:j]=y
Use of negative indices is not supported.
从帮助文档可以看出这个方法函数可...
分类:
编程语言 时间:
2014-05-09 01:01:56
阅读次数:
326
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-08 06:33:29
阅读次数:
339
Problem Description
You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤ ...
分类:
其他好文 时间:
2014-05-07 07:59:11
阅读次数:
309
这篇对应的是习题39 字典, 可爱的字典
#encoding:utf-8
#列表与字典的区别
#列表
thing = ['name',1,'age','AD','sex']
print thing[1]
#print thing['name'] #会报错,列表只能通过整数去访问:TypeError: list indices must be integers, not str
stuff...
分类:
编程语言 时间:
2014-05-07 06:00:20
阅读次数:
365
[Question]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to t...
分类:
其他好文 时间:
2014-05-07 05:37:44
阅读次数:
278
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2014-05-03 21:35:49
阅读次数:
310
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-01 08:35:40
阅读次数:
443
题目: Given an array of integers, find two numbers
such that they add up to a specific target number. The function twoSum should
return indices of the t...
分类:
其他好文 时间:
2014-04-30 03:20:07
阅读次数:
502