【发布时间】:2021-01-19 22:04:18
【问题描述】:
打印数组长度大于等于4的元素,如
things = ['jump','hop','skip','tip',leap']
【问题讨论】:
-
遍历列表(例如使用
for value in things:)并调用len() -
[e for e in things if len(e)>=4]
标签: python arrays math integer boolean