Calendar in Python Lists

$$/$$

Let’s raise the bar a little now by taking level-2 lists (2-D list) into consideration. Here is a simple problem to start.

 

You are planning to go to your friend's wedding and you have long events all month, going on for atleast a few days. You have the start and end dates of events and your task is to find out events that are overlapping with the wedding date. 

 

Let’s understand how Sajan approaches the problem

DS_B14_1.2.2_Ver 01_Video 04
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
  • Chapters
  • descriptions off, selected
  • subtitles off, selected
      $$/$$

      Can you convert this logic to code now? You can check out Sajan's explanation of how to convert the logic to code in the next video for your reference.

      $$/$$

      Here is the explanation of how Sajan coded the above explained logic. 

      DS_B14_1.2.2_Ver 01_Video 10
      Video Player is loading.
      Current Time 0:00
      Duration 0:00
      Loaded: 0%
      Stream Type LIVE
      Remaining Time 0:00
       
      1x
      • Chapters
      • descriptions off, selected
      • subtitles off, selected
          $$/$$

          This question was just to make you a little more comfortable with iterating through a 2-D list or a level-2 list. Let's solve one more question on a 2-D list before wrapping up the session.