[Huawei] cloud technology to share some ideas Python interview to share with Python exercises

About foundation

Project intends to recruit an automated operation and maintenance, the main demand is python, Linux and shell scripting capabilities. Interview a few days but found some problems:

False Resume

No matter what you do this, the water content of the resume are mostly common to see a resume than a sharp, one side is the ability of a weak leg. No one wants their ability to write 120 80 points, but sometimes leave some outrageous, ask a question or two on the leak ...

Age and salary

The current IT industry, most dare sit starting salary is 27-33 this age, often below the range of ability or quit because of less experience, but did not dare to high prices, above this age lose the feeling for young people dynamism and ability to learn, so the salary is not too high or floating a good discussion. Of course, here that the general situation, and does not include a strong ability of those talents.

Light weight high-end basic

Often you will find that the people interviewed, up just like what you say is similar to high-end, cutting-edge technology has done. You lug ask you a question, answer okay. But when you ask some of the more basic things, but unsatisfactory answer. But sometimes, BUG often occur in those small basic link.
A few examples of these days:

  • list tuple dict set is iterables, then the string is iterables?

A hot head, the answer is not immediately, but in fact ...

1 >>> from collections import Iterable
2 >>> isinstance('abc', Iterable)
3 >>> True
4 >>> isinstance('', Iterable)
5 >>> True
  • When asked to define a set of Python in the interview, A says you can use curly braces wrapped generate multiple types of data collection. That created an empty set it? A reply to an easy to read on, add an empty pair of braces ...
1 >>> type({1,2,3})
2 >>> <class 'set'>
3 >>> type({})
4 >>> <class 'dict'>
5 >>> type(set())
6 >>> <class 'set'>
  • Suppose a List A is [1,2,3,4], how to get the last data A is A [-1], how to insert the number 5 to the end of the A? A.append (5) OK, looks like he thought I said was inserted, without charging a A.insert (-1,5). Use -1 index now looks like before I get asked about the last element, but this really it?
1 >>> A=[1,2,3,4]
2 >>> A.insert(-1,5)
3 >>> A
4 >>> [1, 2, 3, 5, 4]

append () method is to increase the value of a data item at the end of the list, insert () method refers to a specific location before adding a data item.

A few examples, we see that perhaps answer some stupid, but in fact this knowledge to reflect a weak knowledge base.

About Python practice

These days some of my friends asked, python-based knowledge and read some books, but always felt finished school would be finished, feel learned a bunch of knowledge, understanding and application of what no depth. In fact, these are because of too little exercise. For algorithm can go https://leetcode.com/ Chinese website https://leetcode-cn.com/ some algorithms to brush the question, or the classic pen questions.

Exercise also have a collection of python100 example of the rookie tutorial:

If you think online course to brush the question of trouble, you can also look at this Python100 classic exercises PDF of learning:

PDF下载地址:https://pan.baidu.com/s/1rVTqBBUJGBQwlQlHheFvlA 提取码:fl2k

The End

OK,今天的内容就到这里,如果觉得内容对你有所帮助,欢迎点赞。
期待你关注我的公众号 清风Python,如果觉得不错,希望能动动手指转发给你身边的朋友们。

作者:清风Python

Guess you like

Origin www.cnblogs.com/huaweicloud/p/12384884.html