Day: November 1, 2018
Python Queue
from collections import deque queue = deque([10, 20, 30]) queue.append(40) # apppend data at the right side queue.append(50) # apppend data at the right side queue.appendleft(5) # apppend data at the left side print(“After Insertion ata:”) for i in range(len(queue)):… Read morePython Queue
Python Array
from array import * a = array(‘i’, [23, 56, 78, 11, 67]) # Here i is Typecode for x in range(len(a)): print(a[x], end=” “) নিম্নে টাইপকোডগুলো দেয়া হলঃ Type code মান b সাইন ইনটিজার সাইজ ১ বাইট B আনসাইন ইনটিজার… Read morePython Array
Python Stack
stack = [] stack.append(10) stack.append(12) stack.append(15) print(“After Data Insertion (PUSH)”) for i in range(len(stack)): print(stack[i]) stack.pop() print(“After deletion Data (POP): “) for i in range(len(stack)): print(stack[i]) আমরা ক্লাস ব্যবহার করে ও stack অপারেশান দেখতে পারি। class Stack: def __init__(self): self.stack… Read morePython Stack