Quick actions

cmd+k|ctrl+k

Navigation

Languages

list comprehension

Snippet info

Language

Python

Visibility

public

Author

hltse59

Created

2024-04-08T11:30:31.623862Z

Updated

2024-04-08T11:30:31.623862Z

fruits = ["apple", "banana", "cherry", "kiwi", "mango"]

newlist = [x for x in fruits if "a" in x]

print(newlist)
INFO