zoukankan
html css js c++ java
递归调用输出元素 分类: python 小练习 python基础学习 2013-06-30 11:54 278人阅读 评论(0) 收藏
#使用递归,输出所有的列表元素
l1 = [1,2,3,[4,5,6],[4,3,2,1,['a','b','c'],[ ] ] ]
def getElement(l):
for i in l:
if isinstance(i,list):
getElement(i)
else:
print i,
getElement(l1) #结果:1 2 3 4 5 6 4 3 2 1 a b c
版权声明:本文为博主原创文章,未经博主允许不得转载。
查看全文
相关阅读:
(zhuan) Paper Collection of Multi-Agent Reinforcement Learning (MARL)
SalGAN: Visual saliency prediction with generative adversarial networks
百善孝为先
现代人为这个世界留下了什么?
如人饮水,冷暖自知。
移动端tap与click的区别 && 点透事件
渐进增强与优雅降级 && css3中普通属性和前缀属性的书写顺序
JavaScript中的垃圾回收机制与内存泄露
http2.0之头部压缩
状态码301和302的区别
原文地址:https://www.cnblogs.com/think1988/p/4628141.html
最新文章
Sample Classification Code of CIFAR-10 in Torch
(转) Learning Deep Learning with Keras
(zhuan) Recurrent Neural Network
论文阅读:Prominent Object Detection and Recognition: A Saliency-based Pipeline
物体检测算法 SSD 的训练和测试
Deep Learning framework --- MexNet 安装,测试,以及相关问题总结
Install and Compile MatConvNet: CNNs for MATLAB --- Deep Learning framework
论文笔记之:Learning Cross-Modal Deep Representations for Robust Pedestrian Detection
The frequent used operation in Linux system
(zhuan) Speech and Natural Language Processing
热门文章
Optical Flow related Tutorials
The issus in Age Progression/Regression by Conditional Adversarial Autoencoder (CAAE)
(转) 干货 | 图解LSTM神经网络架构及其11种变体(附论文)
强化学习策略梯度方法之: REINFORCE 算法(从原理到代码实现)
(zhuan) Evolution Strategies as a Scalable Alternative to Reinforcement Learning
Summary on deep learning framework --- Theano && Lasagne
(zhuan) Using convolutional neural nets to detect facial keypoints tutorial
Awesome Torch
Learning to Track at 100 FPS with Deep Regression Networks
(zhuan) 一些RL的文献(及笔记)
Copyright © 2011-2022 走看看