尝试搜索此列表
a = ['1 is the population', '1 isnt the population', '2 is the population']
如果可以实现,我想做的是在列表中搜索值1。如果值存在,则打印字符串。
如果数字存在,我想要获得的输出是整个字符串。如果值1存在,我想获得的输出将打印字符串。IE
1 is the population
2 isnt the population
上面是我想要的输出,但是我不知道如何得到它。是否可以在列表及其字符串中搜索值1,如果出现值1,则输出字符串
慕标5832272
泛舟湖上清波郎朗
蝴蝶刀刀
相关分类