Python face question

Source: Internet
Author: User

1.How is arguments passed–by reference of by value?

2.Do know what list and dict comprehensions is? Can you give an example?

3.What is PEP 8?

4.Do use virtual environments?

5.Can you sum all of the elements in the list, what about to multuply them and get the result?

6.Do know what is the difference between lists and tuples? Can you give me a example for their usage?

7.Do you know the difference between range and xrange?

8.Tell me a few differences between Python 2.x and 3.x

9.What is decorators and what is their usage?

10.The with statement and its usage.

11. Tell me about your understanding of Zen of Python and what you can do to see it

What Python libraries have been forked on the 12.github, listing what you often use, and each library describing its functions in a single sentence

13. What are your methods for debugging Python code?

14. What is Gil

15. What is a meta-class (Meta_class)

16. Compare items and Iteritems in Dict

17. If you have encountered a problem with Python's inter-module circular reference, how to avoid it

18. Have you ever worked with statement? What are the benefits of it?

19. Talk about the usage of decorator and its application scenarios, if you can, write a decorator

What is the 20.inspect module for?

21. Write a class and make it as many support operators as possible

22. Say that you've seen the more cool Python implementations

Limitations of multithreading under 23.python and how parameters are passed in multiple processes

How does 24.Python manage memory?

25. What is a lambda function? What good is it?

26. How do I output a Fibonacci sequence in Python?

27. Describe the use of WebBrowser in Python?

28. Explain Python's and-or syntax

How does the 29.Python perform type conversion?

30.Python How do I implement a singleton mode? How do the other 23 design pattern Python implementations work?

31. How do I use Python to query and replace a text string?

32. How do I use Python to send mail?

33. Is there a tool that can help find Python bugs and perform static code analysis?

34. There are two sequences a, B, the size is n, the value of the sequence element arbitrarily shaped number, unordered;
Requirement: To minimize the difference between the and of [sequence A and] and [sequence B elements] by exchanging the elements in A/b.

35. How do I delete a file in Python?

36.Python How do I copy a file?

37.python program Chinese output problem how to solve?

38.python code gets the intersection of list and difference set

39. Write a simple Python socket program

40.python How to catch exceptions

41. In Python, what is the difference between list, tuple, dict, set, and what is the main application in the scenario?

42. What are the differences between static functions, class functions, and member functions?

A=1, b=2, the values of A and B are not exchanged for intermediate variables.

44. Write a function, enter a string, return the result in reverse order: such as: String_reverse (' abcdef '), return: ' FEDCBA '

45. Use your own algorithm to merge the following two lists in ascending order and remove the duplicate elements:
List1 = [2, 3, 8, 4, 9, 5, 6]
List2 = [5, 6, 10, 17, 11, 2]

46. Describe the problem with the following code snippet

FromAmoduleImport*# Amodule is an exist moduleClassDummyclass(Object):Def__init__(Self):Self.Is_d=TruePassClassChilddummyclass(Dummyclass):Def__init__(Self,Isman):Self.Isman=Isman@classmethodDefCan_speak(Self):ReturnTrue@propertydef man (selfreturn self. Isman if __name__ ==  "__main__" : Span class= "NB" >object = new childdummyclass (true print object. Can_speak () print object. Man () print object. Is_d                 

47. Introduction to Python's exception handling mechanism and its own experience in the development process

48. Explain the relationship between WSGI and FastCGI?

49. Explain the relationship between Django and Tornado, the difference

50. Explain that Django uses the Redis cache server

51. How to perform Django unit testing

52. Explain the HTTP protocol

53. Explanation of HTTP request headers and common response status codes

54. Describe OO,OOA separately

55. Describe in regular expressions? Meaning of P

The specific meaning of self in the 56.Python class is

57. Please write out Python's commonly used built-in functions (at least 3) and describe their specific meanings

58. You can use Python for post data submission, what modules can be loaded to operate? What do I need to do with the data before the operation?

59. Say how the Python middleware SQLAlchemy is specifically declared? And the difference between a module and a mysqldb?

60. Describe the common framework of Python in 3 and briefly describe the pros and cons of these frameworks

What is 61.reactor? What's the effect? Please describe briefly.

62. Please describe the general format of data flow between 2 different languages.

63. Describe the relationship between the lock and the semaphore when we use multithreaded programming.

64. What are the modules that we use to disassemble and glue packets when we write TCP services in Python? How do I load this module?

65. Two array of integers have 10 billion data, and have been sorted, saved on disk, memory 10M.
Q:
(1) How do I get the intersection? What are the efficiency of time and space? Python Collection Set () Action method
(2) if one of the arrays has only 100 data, how does the optimization algorithm get the intersection? What are the efficiency of time and space?
(3) to implement the 2nd problem in a familiar language, the requirement can be run correctly; Assuming that the function Read_elt (arrary_name, index) can be used to read the index element of an array, the number of elements is represented by m=100 and n=10^10 respectively.

66. There are 100 disks of storage systems, data loss occurs when 3 disks are damaged at the same time. If the damage rate for 1 disks is P, what is the probability of the entire storage system losing data?

67. Describe the procedure for inserting values into the B-tree

67. A pipeline can send characters from A to B end, can only send 0-9 of these 10 numbers, design the protocol of the message, let a can inform B any size number, and discusses the processing power of errors that this message protocol may send.

68. Assume that FD is a socket,read (FD, buf, 1024x768)
Q: What values might be returned? What does it mean?

69. What are the applications that spin locks are suitable for?

70. Suppose the network loses the message, the process may terminate unexpectedly, the disk is reliable (not lost after writing the data);
Q:
How to build a reliable distributed key-value storage system?
The answer is as follows:
1. The client sends 1 write requests to the system (for example, Key=x, value=1), and the system returns ' success ', and the client must correctly read the value of Key=y to
2. In the system you designed, to meet the 1th above, and has a certain fault-tolerant ability.
3. If you want to maximize write or read/write success, if you improve system design? What are the respective problems?

71. Suppose your keyboard has only the following keys:
A
Ctrl + A
Ctrl + C
Ctrl + V
Here Ctrl+a,ctrl+c,ctrl+v represents "Select All", "Copy", "Paste" respectively.
If you can only press the keyboard n times, write a program that can produce a maximum number of a. This means that the input is n (the number of times you press the keyboard) and the output is m (the number of a generated).

Add sub-item:
Print out the keys that you pressed in the middle.


72. Suppose you have a one-month log with the following format:
[I 130403 17:26:40] 1 get/question/123 (8.8.9.9) 200.39ms
[I 130403 17:26:90] 1 get/topic/456 (8.8.9.9) 300.85ms
[I 130403 17:26:90] 1 post/answer/789 (8.8.9.9) 300.85ms
...
In square brackets are: level, date, time, followed by user ID, return code, access mode, access path, User IP, Response time
The log file name format is: year-month-day-hour. Log, such as: 2013-01-01-18.log, a total of 30*24 files.
Write a program that calculates a list of users and a list of paths that meet the following requirements:
(1). These users will access (GET)/topic/*** This path more than two times a day (* represents a number)
(2). The/topic/*** path for these users to access (GET) on a daily basis will contain at least two different paths (the following numbers are not the same)
(3). A list of paths that appear more than two times per day in the path visited by all the above users

73. There are two sequences a, B, the size is n, the value of the sequence element arbitrarily shaped number, unordered;

Requirement: To minimize the difference between the [sequence A and] and the [sequence B elements] by exchanging the elements in A/b

What are the flaws in 74.Python language?

75.What is some key differences to coding in Python vs. Java?

76. What are the alternative implementations of CPython? When and why would you use them?

Is the python interpreted or compiled?

78. Why use a function decorator? Please give examples

78. Now there is a Dict object adict, which contains 1 million elements, to find out how many times the average of an element is compared? What about 10 million elements?

79. Now there is a list object alist, all the elements inside are strings, write a function to it to implement a case-insensitive sort.

What is the module in 80.python about the "heap" data structure? What are the advantages and disadvantages of "heap"? A problem that may be used in a game development (not limited to Python's heap, which can be a related implementation in other languages).

Which version of 81.set became build-in types? Give a question about the data structure you used in previous projects (not limited to Python's set, which can be implemented in other languages), and why this data structure was chosen at the time.

82. There is an ordered list object alist to find out if there is an element a (Use standard library functions as much as possible)

83. Implement a stack.

84. Write a simple INI file interpreter.

85. Existing N Plain text format of the English file, to achieve a search scheme, that is, to do a small search engine.

Python face question (turn)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.