python 数组操作
从数组中去指定下标的元素组成新数组
global loops
loops = []
for index, i in enumerate(origin):
if index % 3 == 2:
print 'index is %d, i is %s' % (index,i)
loops.append(i)
print loops
---------------------------------------------------------------------------------------------
origin 数组 ['www.baidu.com', '23', '8', 'www.sohu.com', '10', '9']
loops 数组 ['8', '9']
相关推荐
huavhuahua 2020-11-05
Tristahong 2020-10-14
Winterto0 2020-06-26
feishicheng 2020-06-09
laohyx 2020-05-07
举 2020-05-06
cenylon 2020-04-22
sschencn 2020-04-21
yawei 2020-02-26
chaigang 2020-02-25
小方哥哥 2020-01-12
千锋 2019-12-28
fgleeldq 2020-01-01
坚持是一种品质 2019-12-15
wklken的笔记 2019-12-03
LczPtr 2019-11-19
duanlove技术路途 2019-11-09
苏牧蕾的极客空间 2019-11-04