The best 20 python questions on StackOverflow 2017

Source: Internet
Author: User

1. Python's. (dot number) What is the syntax?

Answer Address: Https://stackoverflow.com/questions/43487811/what-is-python-dot-dot-notation-syntax

2, why in the Python3 x**4.0 than x**4 run faster?

Answer Address: https://stackoverflow.com/questions/42355194/why-is-x4-0-faster-than-x4-in-python-3

3. Given a number with a length of 1 million (such as π), the write code calculates all successive three digits and requires that the successive three digits repeat at least once.

Answer Address: https://stackoverflow.com/questions/47581326/given-a-string-of-a-million-numbers-return-all-repeating-3-digit-numbers

4, why in Python expression 0, 0 = = (0, false) The result is (0, false)

Answer Address: Https://stackoverflow.com/questions/44864156/why-in-python-0-0-0-0-equals-0-false

5. Does python optimize a variable that is used only as a return value?

Answer Address: Https://stackoverflow.com/questions/43390869/does-python-optimize-away-a-variable-thats-only-used-as-a-return-value

6, accelerate the Python3 in the million-level regular replacement.

Answer Address: https://stackoverflow.com/questions/42742810/speed-up-millions-of-regex-replacements-in-python-3

7, two sets are set, why are the elements in the collection missing?

Answer Address: Https://stackoverflow.com/questions/44489658/union-of-2-sets-does-not-contain-all-items

8, in the For loop, i = i + 1 and i + = 1 What is the difference?

Answer Address: Https://stackoverflow.com/questions/41446833/what-is-the-difference-between-i-i-1-and-i-1-in-a-for-loop

9. Why is it a lot slower to copy a shuffle list?

Answer Address: Https://stackoverflow.com/questions/42107442/why-is-copying-a-shuffled-list-much-slower

10. Why are tuples consuming less memory than lists?

Answer Address: https://stackoverflow.com/questions/46664007/why-do-tuples-take-less-space-in-memory-than-lists

11. In Python, what happens when you assign a value to another variable with one variable?

Answer Address: https://stackoverflow.com/questions/45053461/ What-happens-when-you-assign-the-value-of-one-variable-to-another-variable-in-py

12, why this Python string attempt to convert to an integer failed, the even size has changed.

Answer Address: https://stackoverflow.com/questions/47062184/ Why-does-the-size-of-this-python-string-change-on-a-failed-int-conversion

13. How can I tell if a list is divisible by another list?

Answer Address: Https://stackoverflow.com/questions/45906747/is-a-list-potentially-divisible-by-another

14, understand the statement *x, = list.

Answer Address: Https://stackoverflow.com/questions/43190992/understanding-x-lst

15. Why can I use any target expression in a for loop?

Answer Address: Https://stackoverflow.com/questions/44317993/why-are-arbitrary-target-expressions-allowed-in-for-loops

16, better Python for loop mode.

Answer Address: Https://stackoverflow.com/questions/46996315/a-better-way-for-a-python-for-loop

17. The strange way to use Python and operator.

Answer Address: Https://stackoverflow.com/questions/47007680/strange-use-of-pythons-and-operator

18. Increase the maximum number of logical layers in Python code.

Answer Address: https://stackoverflow.com/questions/44972719/ why-does-python-have-a-limit-on-the-number-of-static-blocks-that-can-be-nested

19, how to let a dataframe around the center of rotation?

Answer Address: Https://stackoverflow.com/questions/47152691/how-to-pivot-a-dataframe

20. What's the use of assigning a variable to yourself?

Answer Address: https://stackoverflow.com/questions/43853407/re-assigning-a-name-to-itself

The best 20 python questions on StackOverflow 2017

Related Article

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.