Python Interview Questions & Answers - Part 9


  • Team myQ

    33) Mention five benefits of using Python?

    • Python comprises of a huge standard library for most Internet platforms like Email,
      HTML, etc.
    • Python does not require explicit memory management as the interpreter itself allocates the memory to new variables and free them automatically
    • Provide easy readability due to the use of square brackets
    • Easy-to-learn for beginners
    • Having built-in data types saves programming time and effort from declaring
      variables

    34) Mention the use of the split function in Python?

    The use of the split function in Python is that it breaks a string into shorter strings using the defined separator. It gives a list of all words present in the string.


    35) Explain what is Flask & its benefits?

    Flask is a web microframework for Python based on “Werkzeug, Jinja 2 and good intentions” BSD licensed. Werkzeug and jingja are two of its dependencies.

    Flask is part of the micro-framework. Which means it will have little to no dependencies on external libraries. It makes the framework light while there is a little dependency to update and fewer security bugs.


    36) Mention what is the difference between Django, Pyramid, and Flask?

    Flask is a “microframework” primarily build for a small application with simpler requirements. In flask, you have to use external libraries. Flask is ready to use.

    Pyramid are build for larger applications. It provides flexibility and lets the developer use the right tools for their project. The developer can choose the database, URL structure, templating style and more. Pyramid is heavy configurable.

    Like Pyramid, Django can also be used for larger applications. It includes an ORM.