Python face question

Source: Internet
Author: User
Tags message queue mysql index what is nginx rabbitmq redis cluster

The first part of the basic Python (80 questions)
  1. Why learn python?

  2. What is the way to learn python?

  3. Python vs. Java, PHP, C, C #, C + +, and other languages?

  4. Describe the explanatory and compiled programming languages?

  5. What are the Python interpreter types and features?

  6. Bit-and-byte relationships?

  7. B, B, KB, MB, GB relationship?

  8. Please list at least 5 PEP8 specifications (the more the better).

  9. The following transformations are implemented by code:

    Binary conversion to decimal: v = "0b1111011"?
    Decimal converted to binary: v = 18?
    Octal into decimal: v = "011"?
    Decimal into octal: v = 30?
    16 binary converted to decimal: v = "0x12"?
    Decimal converted to 16 binary: v = 87

  10. Write a function implementation to convert the IP address into an integer.

    If the 10.3.9.12 conversion rule is:
    10 00001010
    ? 3 00000011?
    9 00001001
    ? 12 00001100?
    Then the above binary stitching together to calculate the decimal result: 00001010 00000011 00001001 00001100 =?
  11. What is the maximum number of layers for python recursion?

  12. To find the result:
    V1 = 1 or 3?
    V2 = 1 and 3?
    V3 = 0 and 2 and 1
    ? V4 = 0 and 2 or 1
    ? V5 = 0 and 2 or 1 or 4
    ? V6 = 0 or flase and 1
  13. What is the difference between ASCII, Unicode, Utf-8, GBK?

  14. What is the difference between bytecode and machine code?

  15. Ternary operation rules and application scenarios?

  16. Enumerate the differences between Python2 and Python3?

  17. Numeric exchange with one line of code:
    ? A = 1
    ? b = 2

  18. What is the difference between int and long in Python3 and Python2?

  19. What is the difference between xrange and range?

  20. File operation: What is the difference between Xreadlines and readlines?

  21. Enumerate the common values for which the Boolean value is False?

  22. String, list, tuple, dictionary each of the 5 commonly used methods?

  23. Lambda expression format and application scenario?

  24. The role of pass?

  25. *arg and **kwarg effects

  26. The difference between IS and = =

  27. Describe Python's deep copy and application scenarios?

  28. Python garbage collection mechanism?

  29. What are the mutable types and immutable types of python?

  30. To find the result:
    ? v = dict.fromkeys ([' K1 ', ' K2 '],[])?
    v[' K1 '].append (666)
    ? Print (v)?
    v[' k1 '] = 777
    ? Print (v)
  31. To find the result:
  32. Enumerate common built-in functions?

  33. The role of filter, map, reduce?

  34. One line of code implements 9*9 multiplication table

  35. How do I install a third-party module? And what third-party modules have been used?

  36. What are some of the 8 common modules that are listed at least?

  37. What is the difference between match and search for re?

  38. What is a regular greedy match?

  39. Results:? A. [I% 2 for I in range (10)]? B. (I% 2 for I in range (10))

  40. Results:? A. 1 or 2? B. 1 and 2? C. 1 < (2==2)? D. 1 < 2 = = 2

  41. def func (a,b=[]) What kind of a hole is there in this notation?

  42. How do you achieve "1", ' 2 ', ' 3 '?

  43. How do I achieve [' 1 ', ' 2 ', ' 3 '] become [All-in-all]?

  44. Comparison: a = [3] and B = [(1), (2), ()] and B = [(1,), (2,), (3,)] the difference?

  45. How do I generate [1,4,9,16,25,36,49,64,81,100] in one line of code?

  46. A line of code implements the deletion of duplicate values in the list?

  47. How do I set a global variable in a function?

  48. What is the function of the logging module? and application scenarios?

  49. Please use the code to implement the stack with a simple answer.

  50. What kinds of commonly used string formatting?

  51. Brief description of generators, iterators, iterative objects, and scenarios?

  52. A binary lookup function is implemented in Python.

  53. Talk about your understanding of closures?

  54. What is the role of OS and SYS modules?

  55. How do I generate a random number?

  56. How do I delete a file using Python?

  57. What's your understanding of the opposite to the object?

  58. What are the characteristics of Python-oriented inheritance?

  59. What is object-oriented depth first and breadth first?

  60. The role of super in object-oriented?

  61. Have you ever used a function in Functools? What is its role?

  62. Enumeration of special methods with crisp underlines in object-oriented, such as: __new__, __init__

  63. How to judge a function or a method?

  64. What is the difference between a static method and a class method?

  65. Enumeration of special members in object-oriented and application scenarios

  66. 1, 2, 3, 4, 5 can be composed of how many different and no duplicates of three digits

  67. What is reflection? and application scenarios?

  68. Metaclass role? and application scenarios?

  69. Use as many methods as possible to implement the singleton pattern.

  70. The wording of the adorner and the application scenario.

  71. Exception handling and how to proactively run out of exception (application scenario)

  72. What is object-oriented MRO

  73. Isinstance role and application scenario?

  74. Write code and implement:
    Given an array of integers, return indices of the both numbers such that they add-to a specific target. Assume that each input would
    There are exactly one solution, and you could not use the same element twice.
    Example:?
    Given nums = [2, 7, one, +], target = 9,
    ? Because Nums[0] + nums[1] = 2 + 7 = 9,?
    return [0, 1]
  75. What types of data can be processed when JSON is serialized? How do I customize support for datetime types?

  76. When JSON is serialized, the default is that Chinese is converted to Unicode, what if I want to keep Chinese?

  77. What is an assertion? Application scenarios?

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

  79. Use the code implementation to view all the files in the enumeration directory.

  80. Describes the yield and yield from keyword.

Part two network programming and concurrency (34 questions)
  1. Describes the OSI seven layer protocol.

  2. What is a/C and B/s architecture?

  3. A brief description of the three-time handshake and four wave-waving process.

  4. What is the ARP protocol?

  5. What is the difference between TCP and UDP?

  6. What are LAN and WAN?

  7. Why is TCP protocol-based communication more reliable than UDP-based communication?

  8. What is a socket? This paper describes the socket communication process based on TCP protocol.

  9. What is a sticky bag? What is the cause of the sticky packet in the socket? What happens when a sticky bag occurs?

  10. What is the role of IO multiplexing?

  11. What is a firewall and what is the role?

  12. What are the differences between select, poll, and Epoll models?

  13. Describe the differences between process, thread, and association, and the application scenario?

  14. What the hell is a Gil lock?

  15. How do I use the thread pool and process pool in Python?

  16. The role of threading.local?

  17. How is communication between processes?

  18. What is concurrency and parallelism?

  19. What is the role of process lock and wire lock?

  20. Explain what is asynchronous non-blocking?

  21. What are the differences between routers and switches?

  22. What is domain name resolution?

  23. How do I modify the local hosts file?

  24. Producer consumer model application scenarios and advantages?

  25. What is a CDN?

  26. What is LVS and what is the role?

  27. What is nginx and how does it work?

  28. What is the role of keepalived?

  29. What is haproxy and how does it work?

  30. What is load balancing?

  31. What is RPC and application scenarios?

  32. The function and application scenario of Asynio module are briefly described.

  33. The function and application scenario of Gevent module are briefly described.

  34. Use and application of the twisted framework?

Part III databases and caches (46 questions)
  1. What are the common relational databases and non-relational types?

  2. MySQL common database engine and comparison?

  3. Describe the three main paradigms of data?

  4. What is a transaction? How does MySQL support transactions?

  5. Describe a one-to-many and many-to-many application scenarios in database design?

  6. How to implement mall commodity counter based on database?

  7. Common SQL (required)
    See Wu Jianzi Blog: https://www.cnblogs.com/wupeiqi/articles/5729934.html

  8. Describe triggers, functions, views, stored procedures?

  9. MySQL index type

  10. Under what circumstances does the index follow the rule with the leftmost prefix?

  11. What is the difference between a primary key and a foreign key?

  12. What are the common functions of MySQL?

  13. Lists 8 scenarios in which indexes are created but not hit.

  14. How do I turn on slow log queries?

  15. Database Import Export Command (structure + data)?

  16. Database optimization scheme?

  17. What is the difference between char and varchar?

  18. Brief description of MySQL execution plan?

  19. Under the unique index of name, the following differences are outlined:?
    SELECT * from TB where name = ' Oldboy-wupeiqi '?
    SELECT * from TB where name = ' Oldboy-wupeiqi ' limit 1

  20. 1000w data, when using limit offset paging, why the more backward climb slow? How to solve?

  21. What is an index merge?

  22. What is an overlay index?

  23. Brief description of database read/write separation?

  24. A brief description of database sub-Library sub-table? (Horizontal, vertical)

  25. Redis and memcached comparison?

  26. How many DB and function does the database default in Redis?

  27. Python operating module for Redis?

  28. If the amount of data in a list in Redis is very large, what if the implementation loops through each of the values?

  29. How does Redis implement master-slave replication? and the data synchronization mechanism?

  30. What is the role of Sentinel in Redis?

  31. How do I implement a Redis cluster?

  32. How many hash slots are default in Redis?

  33. What are some of the persistence strategies and comparisons of Redis?

  34. Lists the expiration policies supported by Redis.

  35. MySQL has 2000w data, only 20w of data in Redis, how to ensure that Redis is hot data?

  36. Write code to implement FIFO, LIFO, and priority queues based on the Redis list.

  37. How do I implement Message Queuing based on Redis?

  38. How do I implement publishing and subscriptions based on Redis? And the difference between a publish subscription and a message queue?

  39. What is Codis and function?

  40. What is twemproxy and function?

  41. Write code to implement Redis transactional operations.

  42. What is the function of the Watch command in Redis?

  43. How can I implement the mall commodity quantity counter based on Redis?

  44. The implementation mechanism of Redis distributed lock and Redlock is briefly introduced.

  45. What is a consistent hash? Is there a corresponding module in Python?

  46. How to efficiently find all keys in Redis that start with Oldboy?

Part Four front end, frame and others (155 questions)
    1. Talk about your understanding of the HTTP protocol.

    2. Talk about your understanding of the WebSocket agreement.

    3. What is a magic string?

    4. How do I create a responsive layout?

    5. What front-end frames have you used before?

    6. What is an AJAX request? and use jquery and XMLHttpRequest objects to implement an AJAX request.

    7. How do I implement rotation on the front end?

    8. How to implement long rotation on the front end?

    9. The role of Vuex?

    10. What is the role of a routed interceptor in Vue?

    11. The role of Axios?

    12. Lists the common instructions for Vue.

    13. Brief introduction of JSONP and its realization principle?

    14. What is Cors?

    15. Enumerate the common requests in HTTP requests?

    16. Enumerate the status codes in the HTTP request?

    17. Enumerate the common request headers in HTTP requests?

    18. Look at the results of the picture writing:

    19. Look at the results of the picture writing:

    20. Look at the results of the picture writing:

    21. Look at the results of the picture writing:

    22. Look at the results of the picture writing:

    23. Look at the results of the picture writing:

    24. A comparison of Django, flask, Tornado frameworks?

    25. What is WSGI?

    26. The life cycle of a Django request?

    27. Enumerate the built-in components of Django?

    28. 5 ways to enumerate the Django middleware? And the application scenario for Django middleware?

    29. Brief description of what is FBV and CBV?

    30. When was the Django request object created?

    31. How do I add an adorner to a CBV program?

    32. Enumerate all methods in the Django Orm (all methods of the Queryset object)

    33. What is the difference between only and defer?

    34. The difference between select_related and prefetch_related?

    35. What is the difference between filter and exclude?

    36. Enumerates three ways to write SQL statements in a Django Orm.

    37. How do I set up read and write separations in Django Orm?

    38. The role of F and Q?

    39. What is the difference between values and values_list?

    40. How do I batch create data using Django ORM?

    41. What is the role of Django's form and modeform?

    42. In the Django form component, if the field contains the choices parameter, use two ways to enable the data source to be updated in real time.

    43. What is the role of the On_delete parameter in the ForeignKey field in the Django model?

    44. What is the implementation mechanism of CSRF in Django?

    45. How does Django implement WebSocket?

    46. Which method can I use to carry CSRF tokens, based on the way Django uses Ajax to send a POST request?

    47. How Django creates a log record when adding data to an ORM table.

    48. How is the Django cache set up?

    49. Can the Django cache use Redis? If so, how can I configure it?

    50. What does name do in the Django routing system?

    51. What is the difference between filter and Simple_tag in a Django template?

    52. The role of Django-debug-toolbar?

    53. How do you implement unit testing in Django?

    54. Explain the meaning of DB first and code first in ORM?

    55. How does Django generate the classes in model based on the database tables?

    56. What are the pros and cons of using ORM and native SQL?

    57. Brief introduction to MVC and MTV

    58. What is the role of Django's contenttype component?

    59. What do you know about the restfull norm?

    60. What does the idempotent of an interface mean?

    61. What is RPC?

    62. What is the difference between HTTP and HTTPS?

    63. Why use the Django Rest framework framework?

    64. What are the components in the Django Rest framework framework?

    65. What classes can be inherited by views in the Django Rest framework framework?

    66. Describes the certification process for the Django Rest Framework framework.

    67. How does the Django Rest framework implement user access frequency control?

    68. The advantages of the flask framework?

    69. Flask Framework Dependent components?

    70. The role of the Flask blueprint?

    71. List The used Flask third-party components?

    72. Describe the flask context management process?

    73. The role of G in flask?

    74. What are the relevant classes involved in context management in flask? and describe the main role of the class?

    75. Why should flask maintain the value stack in the local object as a list?

    76. How does a multi-app app in flask work?

    77. What components are required to implement WebSocket in flask?

    78. What is the role of wtforms components?

    79. Flask Framework default session processing mechanism?

    80. Explain the difference between a local object and a Threading.local object in the flask framework?

    81. What is blinker in flask?

    82. What is the difference between the session and the scoped_session in SQLAlchemy?

    83. SQLAlchemy How do I execute native SQL?

    84. How is ORM implemented?

    85. What is the function of the Dbutils module?

    86. Are the following sqlalchemy fields correct? If it is not correct, please correct:
      1234567891011 fromdatetime importdatetime?fromsqlalchemy.ext.declarativeimportdeclarative_base?fromsqlalchemy importColumn, Integer, String, DateTime??Base =declarative_base()??classUserInfo(Base):?       __tablename__ =‘userinfo‘?       id=Column(Integer, primary_key=True, autoincrement=True)?    name =Column(String(64), unique=True)?    ctime =Column(DateTime, default=datetime.now())
    87. How do I set the engine and character encoding for a table in Sqlachemy?

    88. How do I set a federated unique index in Sqlachemy?

    89. The characteristics of Tornado frame are briefly described.

    90. Briefly describe the role of future objects in the Tornado framework.

    91. How do I write websocket programs in the Tornado framework?

    92. How do static files in tornado be handled??: <link href= "{{Static_url (" Commons.css ")}}" rel= "stylesheet"/>

    93. Tornado operate the module used by MySQL?

    94. Tornado operating the module used by Redis?

    95. Describe the application scenario of tornado frame?

    96. Git common command functions:

    97. Describe the following git stash commands and related other commands.

    98. The difference between the merge and Rebase commands in Git.

    99. How does co-development work with Git?

    100. How do I implement code review based on Git?

    101. How does git implement v1.0, v2.0, and other versions of management?

    102. What is Gitlab?

    103. What is the difference between GitHub and Gitlab?

    104. How do I contribute code to a great open source project on GitHub?

    105. What is the role of the. gitignore file in git?

    106. What is Agile development?

    107. Describe the role of the Jenkins tool?

    108. How does the company implement code publishing?

    109. Describe the difference between RabbitMQ, Kafka and zeromq?

    110. RABBITMQ how to make sure data is not lost when the customer gets the task and hangs up before it is processed?

    111. RABBITMQ How do I persist messages?

    112. How does RABBITMQ control the order in which messages are consumed?

    113. What does the following RABBITMQ exchange type mean, respectively? such as: fanout, Direct, topic.

    114. What is celery and what is the application scenario?

    115. The operation mechanism of celery is briefly described.

    116. Celery How to achieve timed tasks?

    117. Brief description of Celery multi-task structure directory?

    118. Celery @app. What is the difference between a task and a @shared_task?

    119. Briefly describe the function and basic use of requests module.

    120. Briefly describe the function and basic use of BeautifulSoup module.

    121. Briefly describe the function and basic use of Seleninu module.

    122. Scrapy workflow for each component in the framework?

    123. How do I set up the proxy (two methods) in the Scrapy framework?

    124. How do I download large files in the Scrapy framework?

    125. How to achieve speed limit in scrapy?

    126. How to implement tentative crawler in Scrapy?

    127. How do I customize commands in Scrapy?

    128. How to realize the depth of the crawler in Scrapy?

    129. How does the pipelines work in scrapy?

    130. Scrapy Pipelines How do I discard an item object?

    131. Briefly describe the role of crawler middleware and download middleware in Scrapy?

    132. What is the role of Scrapy-redis components?

    133. How does the Scrapy-redis of a task in a component be implemented?

    134. How does the Scrapy-redis scheduler implement the task's depth first and breadth first?

    135. Describe vitualenv and application scenarios?

    136. Describe Pipreqs and application scenarios?

    137. What code-checking tools are used in Python?

    138. Describe the role of saltstack, ansible, Fabric, puppet tools?

    139. What is the difference between a B tree and a C + tree?

    140. Please list common sorts and implement any three of them by code.

    141. Please list common lookups and implement any three of them by code.

    142. Please list the design patterns you are familiar with?

    143. Have you ever brushed a leetcode?

    144. List the familiar Linux commands.

    145. What is the system on the company's online server?

    146. Explain the meaning of PV, UV?

    147. Explain the meaning of the QPS?

    148. The difference between Uwsgi and Wsgi?

    149. The role of supervisor?

    150. What is a reverse proxy?

    151. Describe the entire process of SSH.

    152. Any questions, go to those solutions?

    153. Is there a public number that focuses on what technical class?

    154. What new technology is being researched recently?

    155. Have you learned about domain-driven models?

Python face question

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.