Re: [Tutor] Python Questions Help

2014-10-26 Thread Dave Angel
Please don't use html mail in a text newsgroup. And especially don't select black on black for your foreground and background colors. Caroline H Wrote in message: > create a new sorted list consisting of all the elements of lst1 that also appears in lst2 . Are you permitted at this stage

Re: [Tutor] Python Questions Help

2014-10-26 Thread Alan Gauld
On 26/10/14 22:15, Caroline H wrote: For example, lst1 = [2,5,6,7,2] lst2 = [2,4] it comes up with new_list = [2] when I need it to come up with new_list = [2,2] Check the logic in the if statement. Walk through it and se if it does what you expect. You are basically doing the right thing, e

[Tutor] Python Questions Help

2014-10-26 Thread Caroline H
Hi Python Tutor, I'm having a lot of trouble with this python problem and I'm wondering if you can help me. "Given the lists, lst1 and lst2 , create a new sorted list consisting of all the elements of lst1 that also appears in lst2 . For example, if lst1 is [4, 3, 2, 6, 2] and lst2 is [1, 2, 4], t