This is the example list
greekAlpha = ["alpha", "beta", "gamma", "epsilon"]
This is the example list
greekAlpha = ["alpha", "beta", "gamma", "epsilon"]
This is One liner approach to condition
a = [print(word) for word in greekAlpha if "a" in word]
for word in greekAlpha:
if word.count(letter) > 0:
print(word)
What about this?
for word in greekAlpha:
if 'a' in word:
print(word)
If you're worried about case
for word in greekAlpha:
if letter.lower() in word.lower():
print(word)