input: def min_seats_needed(events: str) -> int:
      """
      This function takes a string `events` indicating events occurring at each second:
  
      If events[i] == 'E', a person enters the waiting area and occupies a seat.
      If events[i] == 'L', a person exits the waiting area, freeing a seat.
      Return the minimum number of seats required to ensure each person entering the waiting area finds a seat, given that it starts empty.
  
      Examples:
      >>> events = "EEEEEEE"
      7
      >>> events = "ELELEEL"
      2
  
      Constraints:
      1 <= events.length <= 50
      events contains only the characters 'E' and 'L'.
      events is a valid sequence of entries and exits.
      """
output:     max_seats = 0
      current_seats = 0
  
      for event in events:
          if event == 'E':
              current_seats += 1
              if current_seats > max_seats:
                  max_seats = current_seats
          elif event == 'L':
              current_seats -= 1
  
      return max_seats