python递归小应用
2015-09-23 11:37
676 查看
__author__ = abcddic = { :, :, :{ :, :{ :, :, :{ :, :{ :, :, :{ :, :, :{} } } } } } } Serchabcd(name, dic, list_tmp=[]): i dic: dic[i] == name: list_tmp.append(name) (dic[i]) (dic[i]) != : Serchabcd(name, dic[i], list_tmp) (list_tmp), name count, = Serchabcd(, abcddic) % (count, )
fun_digui(n, list): num = len(list) / num_null = len(list) num_max = len(list) - = list[:num] = list[num:] num_null == : n > list[num_max]: % n n < list[]: % n n < list[num]: , list[:num] fun_digui(n, list[:num]) n > list[num]: , list[num:] fun_digui(n, list[num:]) : , list[num] list2 = [, , , , , , , ] list3 = [] list2 fun_digui(, list3)
相关文章推荐
- python的一些规则
- 北邮网关登录python脚本
- 简单桶排序算法-python实现
- 希尔排序算法-python实现
- 用python写MapReduce函数——以WordCount为例
- 基数排序算法-python实现
- 归并排序算法-python实现
- 堆排序算法-python实现
- 插入排序算法-python实现
- 冒泡排序算法-Python实现
- 选择排序算法-python实现
- 快速排序算法-python实现
- python字典按照值排序
- python 时间模块小结
- Python科学计算发行版—Anaconda
- Python json.dumps
- 解决 python用 xlsxwrite 向excel 中写入中文字符串变量 报错
- Python环境及robotframework安装
- python中str函数isdigit、isdecimal、isnumeric的区别
- Python 爬虫进阶必须的几步