Books
Swati Saxena

Python Interview Questions: Brush up for your next Python interview with 240+ solutions on most common challenging interview questions

  • DDaudalagidhas quoted8 months ago
    The Python os module is used. The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules.
  • DDaudalagidhas quoted8 months ago
    Polymorphism: Many forms of a single object.
    Polymorphism is of two types:
    Early binding: Example - Overloading
    Late Binding: Example - Overriding
    Inheritance: Use for code reusability, where child (sub) class can use properties of the parent (base) class.
  • DDaudalagidhas quoted8 months ago
    Pillars of OOPs:
    Abstraction: To hide complexity and show which is necessary to a current problem scenario.
    Encapsulation: Combine data of the similar type of objects into a single unit.
  • DDaudalagidhas quoted8 months ago
    The __del__() method is known as a destructor method in Python. It is called when all references to the object have been deleted.
  • DDaudalagidhas quoted8 months ago
    Ans.Python has no inbuilt main function to start the execution of the program. Python has special variable __name__; it provides the functionality of the main function.
  • DDaudalagidhas quoted8 months ago
    The zip() returns an iterator and takes iterable as argument. These iterables can be list, tuple, dictionary etc. It maps similar index of every iterable to make a single entity.
  • DDaudalagidhas quoted8 months ago
    The values stored in a list can be accessed using the slice operator ([] and [:]) with indexes starting at 0 at the beginning of the list and working their way to end -1.
  • DDaudalagidhas quoted8 months ago
    Global variables are defined outside of any module and function. These variables can be accessed by any function in the program. Local variables are defined inside the function where it is used.
  • DDaudalagidhas quoted8 months ago
    The Python memory manager manages chunks of memory called “Blocks”. A collection of blocks of the same size makes up the “Pool”. Pools are created on Arenas, chunks of 256kB memory allocated on heap=64 pools.
  • DDaudalagidhas quoted8 months ago
    The allocation of Python heap space for Python objects is done by the Python memory manager. The core API gives access to some tools for the programmer to code.
fb2epub
Drag & drop your files (not more than 5 at once)