Python basis finishing face questions

basis

  • What does this mean in Python lambda
  • Python What is the meaning of pass
  • As an interpreted language, Python how to run
  • What is Python unit testing
  • What is in Python unittest
  • How to convert a number to a string
  • What is Python modules and packages
  • How to generate random numbers in the explanation of the Python
  • How to use the // operator in Python
  • You mentioned five benefits of using Python
  • Simple instructions on how to use the split function in Python
  • The difference between json and dictionaries
  • How to connect to the database operations python

Advanced

  • Explain how to access written in C Python module
  • The difference between the range and xrang
  • * Args, ** kwargs their differences and usage
  • What is the role of decorator give a specific example of a decorator will tell wording restore back
  • Binding map () and lambda and reduce the use of
  • Difference variables python single underline and double lines declining
  • In python multithreading and multi-process difference i / o intensive way to solve what for
  • What is coroutine, what his benefits are
  • What is pickling and unpickling
  • What tools can help you find an error or perform static analysis?
  • What is the Python generators
  • The difference __new__ and __init__
  • How to copy objects in Python
  • python in deepcopy and another copy of the district
  • Parallel python
  • socket programming simple description about the difference between select and epol Shu models
  • What Python rules mentioned in the local and global variables are
  • How can we share global variables across modules
  • Explains how to create a Python script executable on Unix
  • Python garbage collection
  • According to the following requirements to write code for the following functions:
    (1) writing code to download content https://en.wikipedia.org/wiki/Machine_translation page and save it as mt.html
    (2) the statistical mt.html

    Under the label and store all the words to mt_word.txt, it is required:

a) one word per line. First word, the number of occurrences of the word in the middle () separated by Tab.

b) according to the number of words arranged from more to less. For example, a word appears 100 times, b word appeared 10 times, a word to be in front of the word b.

data structure

  • python set and list which high efficiency?
  • 100w what pieces of data stored in a data structure with a higher query efficiency
  • Achieve binary tree traversal
  • A queue is implemented with two stacks
  • how to deal with duplicate hash keys

algorithm

  • Binary search
  • 1-7 equally probable random numbers, random number generation 0-1 Introduction like (use of other methods to do recursive preferably defines a maximum depth of recursion)
  • Statistics for each file abccab number of characters
  • Windows sell five tickets, implemented in Java / Python
  • List l1 l2 l1 and l2 seeking elements add up to 10
  • An integer array, given a number, and to find the two numbers is equal to this number, and print them out in an array, high time complexity I wrote, requires O (n)
  • n integers, to find a continuous and m is the maximum number plus
  • Solving the Tower of Hanoi: Tower of Hanoi: Tower of Hanoi (also known as the Tower of Hanoi) problem stems from an ancient Indian legend of educational toys. Brahman
    time day creation of the world to do three diamond pillars, from bottom to top in order of size to a post
    pile with 64 gold discs. Brahma Brahman command to the disk in order of size from the bottom again placed
    on the other pillars. And predetermined, the disc can not be enlarged in a small disk, only once between the three columns
    can be moved one disc
  • Seeking a list of the least common multiple
  • list = [1,2,3,4,5] target = 3 quickly identify the array is equal to the sum of two elements target the optimal solution is what
    time complexity is?
  • Statistics in a queue number, the number of positive, negative number, such as [1, 3, 5, 7, 0, -1, -9, -4, -5, 8]
  • String "axbyczdj", If you get the result "abcd"
  • Given a string "hello_world_yoyo", how to get a queue
    [ "hello", "world" , "yoyo"]
  • It is known as a number 1, how to output "0001"
  • Given a queue, such as: [1, 3, 5, 7], how the first number into a third position, to give: [3, 5, 1, 7]
  • Known that a = 9, b = 8, how to exchange the values ​​of a and b, to obtain a value of 8, 9, the value of b
  • 100-999 print out all the "number of Narcissus", the so-called "Narcissus number" refers to a three-digit number, which is equal to the digits of the cube and the number itself. For example: 153 is a "Narcissus number", because cubic cubic cubic +3 +5 1 = 153.
  • If a number is exactly equal to the sum of its factors, called the number "perfect number", also known as the number of complete or perfect number. For example: The first is a perfect number 6, it is about the number 1,2,3,6, 6 is removed outside itself, adding the number of the remaining 3, 1 + 2 + 3 = 6. The second number is the 28 completely, it is about several 1,2,4,7,14,28, 28 itself is removed, the remaining number of the sum 5, 1 + 2 + 4 + 7 + 14 = 28. So the question is, find the perfect numbers less than 1000 what?
  • Write a bubble sort in python
  • Given a queue [1, 3, 6, 9, 7, 3, 4, 6] in ascending order, sorted from the large size, number deduplication
  • Calculating the factorial of n
  • Given a series: 1, 1, ,. . . . 3 of the law from the beginning of its first two are equal and each of which is a Fibonacci number. Therefore, to meet the requirements of the law of data within 100
  • N-th power of x, such as: power 4 3 3 3 3 3 = 81 *
  • Write a small program: console enter email address (in the format [email protected]),
    the program recognizes the user name and company name, the output of the user name and company name to the console.
    Claim:
      1. Check whether the input content compliant ([email protected]), the next step into the case, as otherwise thrown mention
    • Shows "incorrect email format". Attention must end with .com
      1. May loop "Input - Output determination result" This entire process
      1. Press the letter Q (not case sensitive) to exit the loop, the program ends
  • Find out how to traverse all the files in a sub-folder within it? And find all the files in a suffix

Web development

  • Write a flask Interface
  • Flask and explain what benefits?
  • Django, Pyramid and Flask What is the difference
  • What Flask-WTF is that what are the characteristics
  • How to access session with Flask
  • Flask is a MVC model it? If so, you can look at an example
  • Database Connectivity explain Python Flask in?
  • Explain how to minimize the development of Python Memcached server outage
  • Python explain the project should or should not use Memcached?
  • nginx and uwsgi how to deploy the project were to talk about their role
  • What is the role of middleware is in django
  • What is csrf
  • how to use django cache

Understand the code

  • The following code will output what, what is the problem
def f(x,l=[]):
    for i in range(x):
        l.append(i*i)
        print l
    
f(2)f(3,[3,2,1])f(3)
  • The following code read, write final value A0, A1 to An
A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5)))
A1 = range(10)
A2 = [i for i in A1 if i in A0]
A3 = [A0[s] for s in A0]
A4 = [i for i in A1 if i in A3]
A5 = {i:i*i for i in A1}
A6 = [[i,i*i] for i in A1]

Guess you like

Origin www.cnblogs.com/superhin/p/11454828.html
Recommended