Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ADT related stacks
#4
Create a function called is_empty(). Its task is to check whether or not there are elements left inside the stack.

1.Create a function called is_empty()
2.It should take one argument: queue
3.return the boolean True if the argument is empty (one method is to compare len(queue) with 0).
Quote:def is_empty(queue):
    return
Reply


Messages In This Thread
ADT related stacks - by prasanthbab1234 - Oct-12-2020, 04:33 PM
RE: ADT related stacks - by buran - Oct-12-2020, 05:52 PM
Adding new items to queue - by prasanthbab1234 - Oct-12-2020, 04:52 PM
Removing items from queue - by prasanthbab1234 - Oct-12-2020, 05:03 PM
check whether or not there are elements left inside the stack. - by prasanthbab1234 - Oct-12-2020, 05:20 PM
RE: Removing items from queue - by deanhystad - Oct-12-2020, 05:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Expression Evaluation Using Stacks walrus_overlord2 3 7,631 Apr-15-2020, 11:19 AM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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