for-if without list comprehension in one line

后端 未结 5 2063
梦如初夏
梦如初夏 2021-02-15 13:29

can this be written in one line without List Comprehensions?

for x in vec: 
    if x > 3:
         ...
         ...
5条回答
提交回复
热议问题