Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exercise List Overlap
#3
sets don't keep track of the order that things were added. If you care about the order, you need something other than a set. They're great for removing duplicates, which is not useful here.

This exercise looks like a good use for zip(). It takes in two streams and combines them, keeping the order. That's exactly what is needed here.
Reply


Messages In This Thread
Exercise List Overlap - by Damian - Apr-01-2021, 03:10 PM
RE: Exercise List Overlap - by Damian - Apr-01-2021, 03:27 PM
RE: Exercise List Overlap - by bowlofred - Apr-01-2021, 04:32 PM
RE: Exercise List Overlap - by Damian - Apr-01-2021, 05:26 PM
RE: Exercise List Overlap - by ICanIBB - Apr-01-2021, 08:17 PM
RE: Exercise List Overlap - by Damian - Apr-01-2021, 08:54 PM
RE: Exercise List Overlap - by bowlofred - Apr-01-2021, 09:33 PM
RE: Exercise List Overlap - by Damian - Apr-02-2021, 07:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tkinter text overlap Frankduc 3 3,111 Apr-01-2022, 08:02 PM
Last Post: deanhystad
  Rotated Rectangle overlap using Shapely pyNew 0 1,747 Feb-25-2021, 04:54 AM
Last Post: pyNew
  How to order the Cronjobs to avoid overlap or conflict sadhaonnisa 1 1,868 Oct-10-2020, 10:26 AM
Last Post: DeaD_EyE
  Exercise about list of lists Otbredbaron 3 3,078 May-03-2018, 09:43 PM
Last Post: micseydel
  Can OpenGL object be overlap? hsunteik 4 5,150 Jan-19-2017, 02:43 PM
Last Post: Windspar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020