-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram32.py
More file actions
114 lines (88 loc) · 2 KB
/
program32.py
File metadata and controls
114 lines (88 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#Stack And Queue---------
#Stack ----
books = []
books.append("Learn C")
books.append("Learn Java")
books.append("Learn Python")
print(books)
books.pop()
print("Now the top books is : ",books[-1])
books.pop()
print("Now the top books is : ",books[-1])
books.pop()
if not books:
print("No Book left")
#Stack And Queue---------
#Stack ----
student = []
student.append("Learn C")
student.append("Learn C++")
student.append("Learn C#")
student.append("Learn Pyhon")
print(student)
student.pop()
print(student)
student.pop()
print("Now the top student.",student[-1])
student.pop()
print("Now the top student.",student[-1])
student.pop()
if not student:
print("Not student left.")
#Stack ----
student = []
student.append("Ariful Islam")
student.append("Nazim Uddin")
student.append("Tamim Iqbal")
student.append("Nahid Hasan")
print(student)
student.pop()
print("Now the top Student is : ",student[-1])
student.pop()
print("Now the top Student is : ",student[-1])
student.pop()
print("Now the top Student is : ",student[-1])
student.pop()
if not student:
print("No student left. ")
#Stack And Queue---------
#Queue ----
from collections import deque
bank = deque(["Arif","Tamim","Nasim"])
print(bank)
bank.popleft()
print(bank)
bank.popleft()
print(bank)
bank.popleft()
print(bank)
if not bank:
print("No person left")
#Stack And Queue---------
#Queue ----
from collections import deque
student = deque(["Arif","Tamim","Nahid"])
print(student)
student.popleft()
print(student)
student.popleft()
print(student)
student.popleft()
print(student)
if not student:
print("No Student left.")
#Stack And Queue---------
#Stack ----
from collections import deque
student = deque(["Arif","Tamim","Nasim","Nadim"])
print(student)
student.popleft()
print(student)
student.popleft()
print(student)
student.popleft()
print(student)
student.popleft()
print(student)
if not student:
print("Have no item here")