Let's iterate over a string of a word Datacamp using for loop and only print the letter a.

PHOTO EMBED

Fri Dec 10 2021 08:41:20 GMT+0000 (Coordinated Universal Time)

Saved by @Tushar_Singh

for i in "Datacamp":
    if i == 'a':
        print (i)
content_copyCOPY

https://www.datacamp.com/community/tutorials/for-loops-in-python