[Tutor] List Python Question..Please help
Jacqueline Canales
jackiexxduh3 at gmail.com
Fri Sep 27 07:48:26 CEST 2013
So I have been trying to do this program using ifs and or loops.
I am having a hard time solving this question, If you could please assist
me in the right direction.
Write a program that lists all the composers on the list ['Antheil',
'Saint-Saens', 'Beethoven', 'Easdale', 'Nielsen'] whose name starts and
ends with the same letter (so Nielsen gets lsited, but Antheil doesn't).
I know below it prints the entire list of composers but i dont know how to
do the program above. I think I am thinking to much into but ive looked at
all my notes and online resources and having a hard time coming up with
anything.
Please help!
composers = ['Antheil', 'Saint-Saens', 'Beethoven', 'Easdale', 'Nielsen']
for person in composers:
print(person)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130927/4abd0101/attachment.html>
More information about the Tutor
mailing list