<section>地址:http://icourse8.com/Python_database.html</section>
<div>立即前往:http://icourse8.com/Python_database.html</div>
详细信息
第1章 数据库简介
第2章 mysql基础
第3章 python API
第4章 ORM
第5章 易新闻实战
第6章 MongoDB 数据库基础
第7章 Python操作MongoDB
第8章 MongoDB ODM(1)
第9章 MongoDB ODM(2)
第10章 MongoDB 易新闻实战
第11章 Redis数据库基础
第12章 python操作redis
第13章 python操作resis新闻实战
class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
if not nums:
return None
d = {}
for i, item in enumerate(nums):
tmp = target - item
for key, value in d.items():
if value == tmp:
return [key, i]
d[i] = item
return None
转载于:https://blog.51cto.com/14127734/2406043