- 博客(4)
- 收藏
- 关注
原创 leetcode-解题2018-4-29
1. Two Sumcode:class Solution: def twoSum(self, nums, target): for a in range(0,len(nums)): for b in range(a+1,len(nums)): if (nums[a]+nums[b]==target): ...
2018-04-29 23:50:33 94
原创 python编程:从入门到实践-第十一章练习
#-*-coding:utf-8 -*-import unittest'''def City_country(city,country): return (city+" "+country).title()class CityTestCase(unittest.TestCase): def test_City_country(self): cc=City_country(...
2018-04-15 15:03:34 155
原创 python编程:从入门到实践-第十章练习
#10-1with open('learning_python.txt') as lp: l1 = lp.read() print(l1) for i in lp: print(i) l2 = lp.readlines() for i in l2: print(i.strip()) for i in l2: ...
2018-04-08 20:50:56 191
原创 python编程:从入门到实践-第九章练习
#-*-coding:utf-8 -*-# 9-1class Restaurant(): def __init__(self,restaurant_name,cuisine_type): self.restaurant_name=restaurant_name self.cuisine_type=cuisine_type def open_restauran...
2018-04-08 20:50:15 223
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人