PEDMAS stands for?
A python list is a:
A Python tuple is:
Range is a:
A dict is a:
A Python set is a:
A stack structure allows users to add and remove items in which order?
Things that can be implemented using stacks:
Tag matching, undo button, back button for web-browsers
A queue structure allows users to add and remove items in which order?
Types of assignments
Shallow vs Deep copy
Shallow copy: A shallow copy creates a new object, but it doesn't create copies of nested objects. Instead, it copies references to the nested objects. - changes made to nested objects in the original object will be reflected in the shallow copy
Deep copy: creates a completely new object and recursively copies all objects found in the original object, including nested objects -
Types of string formatting available
Difference between remove and discard for set()
remove(): This method removes the specified element from the set. If the element is not present in the set, it raises a KeyError exception.
element
KeyError
discard(): This method also removes the specified element from the set. However, if the element is not present in the set, it does nothing and does not raise any exception
What is an iterator?
How exactly do we create it?
An object representing a stream of data
Last changed10 months ago