Skip to main content

Posts

Python Qestion & Answers: Part -2

1) What is Python? What are the benefits of using Python? Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits of pythons are that it is simple and easy, portable, extensible, build-in data structure and it is an open source. 2)  What is PEP 8? PEP 8 is a coding convention, a set of recommendation, about how to write your Python code more readable. 3) What is pickling and unpickling? Pickle module accepts any Python object and converts it into a string representation and dumps it into a file by using dump function, this process is called pickling.  While the process of retrieving original Python objects from the stored string representation is called unpickling. 4) How Python is interpreted? Python language is an interpreted language. Python program runs directly from the source code. It converts the source code that is written by the programmer into an intermediate language, which is again translated

Python Interview Question's & Answer's: PART-1

Basic Python Interview Questions Q1. What are the key features of Python? Ans:   These are the few key features of Python: Python is an  interpreted  language. That means that, unlike languages like  C  and its variants, Python does not need to be compiled before it is run. Other interpreted languages include  PHP  and  Ruby . Python is  dynamically typed , this means that you don’t need to state the types of variables when you declare them or anything like that. You can do things like  x=111  and then  x="I'm a string"  without error Python is well suited to  object orientated programming  in that it allows the definition of classes along with composition and inheritance. Python does not have access specifiers (like C++’s  public ,  private ), the justification for this point is given as “we are all adults here” In Python,  functions  are  first-class objects . This means that they can be assigned to variables, returned from other functions and passed