Python perguntas e respostas de entrevista
Test your skills through the online practice test: Python Quiz Online Practice Test
Diferencas relacionadas
Pergunta 71. Differentiate between SciPy and NumPy?
The difference between SciPy and NumPy is as follows:
| NumPy | SciPy |
| Numerical Python is called NumPy | Scientific Python is called SciPy |
| It is used for performing general and efficient computations on numerical data which is saved in arrays. For example, indexing, reshaping, sorting, and so on | This is an entire collection of tools in Python mainly used to perform operations like differentiation, integration and many more. |
| There are some of the linear algebraic functions present in this module but they are not fully fledged. | For performing algebraic computations this module contains some of the fully-fledged operations |
Isto e util?
Adicionar comentario
Ver comentarios
Pergunta 72. How do Python arrays and lists differ from each other?
The difference between Python array and Python list is as follows:
| Arrays | Lists |
| The array is defined as a linear structure that is used to store only homogeneous data. | The list is used to store arbitrary and heterogeneous data |
| Since array stores only a similar type of data so it occupies less amount of memory when compared to the list. | List stores different types of data so it requires a huge amount of memory |
| The length of the array is fixed at the time of designing and no more elements can be added in the middle. | The length of the list is no fixed, and adding items in the middle is possible in lists. |
Isto e util?
Adicionar comentario
Ver comentarios
Pergunta 73. What is the difference between range and xrange?
Both methods are mainly used in Python to iterate the for loop for a fixed number of times. They differ only when we talk about Python versions.
The difference between range and xrange is as follows:
| Range() method | Xrange() method |
| The xrange() method is not supported in Python3 so that the range() method is used for iteration in for loops. | The xrange() method is used only in Python version 2 for the iteration in loops. |
| The list is returned by this range() method | It only returns the generator object because it doesn’t produce a static list during run time. |
| It occupies a huge amount of memory as it stores the complete list of iterating numbers in memory. | It occupies less memory because it only stores one number at a time in memory. |
Isto e util?
Adicionar comentario
Ver comentarios
Pergunta 74. What is Django? What are different interview questions and answers on Django?
Please refer Django interview questions and answers.
Isto e util?
Adicionar comentario
Ver comentarios
Pergunta 75. List the ways we add view functions to urls.py.
- Adding a function view
- Adding a class-based view
Isto e util?
Adicionar comentario
Ver comentarios
Mais uteis segundo os usuarios:
- What is Python?
- How do I share global variables across modules?
- How do you set a global variable in a function in Python?
- What type of language is Python? Programming or Scripting?
- Why can't I use an assignment in an expression?