After learning Python after , The next problem is interviewing for a job , Today, I summarize for you 10 Avenue Python Frequent interview questions , With answers , Hope to be able to help you find a job .

What tools are available to help find errors or perform static analysis ?

Pychecker Is a static analysis tool , It can detect Python Errors in the source code , And warn of the wrong style and complexity ,pylint It's another tool to verify whether the module meets your coding standard .

Dict and list Understand what it is ?

They are grammatical structures , According to the existing iterable Easily create dictionary perhaps list.

Why? Python Medium lambda The form has no statements ?

Python Medium lambda The form has no statements , Because it's used to create new function objects , And then return them at run time .

What is? Python Unit tests in ?

Python The unit testing framework in is called unittest, Support sharing settings 、 automated testing 、 Test the closing code , Aggregate tests into collections, etc .

stay Python What's the slice in ?

The mechanism of selecting a series of items from a sequence type is called slicing , As listing 、 Tuples 、 String, etc. .

Python Medium docstring What is it? ?

Python The document string is called docstring, It's a record Python function , Methods of modules and classes .

How to convert a number to a string ?

To convert a number to a string , Use the built-in function str(); If you need octal or hexadecimal representation , You can use built-in functions oct() or hex().

Python in module and package What is it? ?

stay Python in , Modules are the way to build programs , Every Python Program files are all a module , It imports other modules , Such as objects and properties ;Python The folder of the program is a module package , Packages can contain modules or folders .

Use Python Five benefits of ?

Python Contains a huge library of standards , For most Internet platform , E-mail 、HTML etc. ;

Python No need for explicit memory management , Because the interpreter itself allocates memory to new variables and automatically releases them ;

Because of the use of square brackets , So it's easy to read ;

Beginners are easy to learn ;

Built in programming and data types can save time , To declare variables .

explain flask What are the common ways of scripting ?

Flask A common way of scripting is : The import path of the application or Python Path to file .