Correction in Python training video Data Structure - Stack (5-13)

Hi,

Thank you for the wonderful python training videos.

Kindly consider the following suggestion,

Timestamp [4:13]

Existing logic should be inverted because we cannot return if the list is empty. That snippet can be updated to

if browsing_session:
  browsing[-1]
else:
  print("Back button disabled")

Thank you,
Muhammad Osaid

2 Likes