[Tutor] Python Questions Help
Dave Angel
davea at davea.name
Mon Oct 27 01:55:10 CET 2014
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 <carolineharlow0 at gmail.com> 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 of your class to use sets? If so,
study their methods, and see if you can come up with a
oneliner.
If you cannot use sets, please post your code again in a text
message and I'll try to see what the problem is. It can't be what
your words say, since a list allows any number of
dups.
You also might need to establish some constraints on your input
data. For example what are you supposed to do if either or both
of the original lists has duplicates?
--
DaveA
More information about the Tutor
mailing list