THANK YOU!!!!!!! All of you were very helpful!! Will definitely use you guys again for any other issues, glad you challenged me to think rather than giving me the answer!!!
On Sat, Sep 28, 2013 at 12:39 AM, Amit Saha <amitsaha...@gmail.com> wrote: > On Sat, Sep 28, 2013 at 3:36 PM, Jacqueline Canales > <jackiexxd...@gmail.com> wrote: > > Thank you guys so much i was able to figure it out. I definitely thought > to > > much into the the problem and made it harder on myself. Cant thank you > > enough for assisting me. I have one more problem with the coding tho. > > > > composers = ['Antheil', 'Saint-Saens', 'Beethoven', 'Easdale', 'Nielsen'] > > new_list = [] > > person = new_list > > for person in composers: > > if person[0].lower() == person[-1].lower(): > > print(person) > > > > Output: > > Saint-Saens > > Easdale > > Nielsen > > Great work! > > > > > composers = ['Antheil', 'Saint-Saens', 'Beethoven', 'Easdale', 'Nielsen'] > > new_list = [] > > person = new_list > > for person in composers: > > if person[0].lower() == person[-1].lower(): > > new_list.append(person) > > print(new_list) > > > > output: > > ['Saint-Saens'] > > ['Saint-Saens', 'Easdale'] > > ['Saint-Saens', 'Easdale', 'Nielsen'] > > > > > > > How can i make the output of the names into just one individual list. > > You mean, just print it once? The last line of your output? > > Just print after the loop is over. > > > > > > -- > http://echorand.me >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor