返回长度大于3的字符串

 

代码及如下

text = '''kobe is fmvp in 2010 but in 2008 
the fmvp is one baller who called by true.
now in lakers lbj is the fmvp in 2020'''

select = [[x for x in line.split() if len(x)>3] for line in text.split('\n')]
print(select)

  

 

posted @ 2021-04-28 16:21  KingOfHuan  阅读(82)  评论(0)    收藏  举报