Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 35653c5

Browse files
authored
Update Readme.md
1 parent 9aad7cf commit 35653c5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Readme.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,9 @@ Note that the syntax changed in Python 3.0: you can just say super().__init__()
669669
http://stackoverflow.com/questions/576169/understanding-python-super-with-init-methods
670670

671671
## 30 range and xrange
672+
都在循环时使用,xrange内存性能更好。
673+
for i in range(0, 20):
674+
for i in xrange(0, 20):
672675
What is the difference between range and xrange functions in Python 2.X?
673676
range creates a list, so if you do range(1, 10000000) it creates a list in memory with 9999999 elements.
674677
xrange is a sequence object that evaluates lazily.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /