Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
s[::-1]
1 parent eba109a commit fb2e946Copy full SHA for fb2e946
2 files changed
Doc/faq/programming.rst
@@ -1116,19 +1116,14 @@ trailing newline from a string.
1116
How do I iterate over a sequence in reverse order?
1117
--------------------------------------------------
1118
1119
-Use the :func:`reversed` built-in function, which is new in Python 2.4::
+Use the :func:`reversed` built-in function::
1120
1121
for x in reversed(sequence):
1122
... # do something with x ...
1123
1124
This won't touch your original sequence, but build a new copy with reversed
1125
order to iterate over.
1126
1127
-With Python 2.3, you can use an extended slice syntax::
1128
-
1129
- for x in sequence[::-1]:
1130
- ... # do something with x ...
1131
1132
1133
How do you remove duplicates from a list?
1134
-----------------------------------------
Doc/tools/susp-ignored.csv
@@ -12,7 +12,6 @@ extending/extending,,:myfunction,"PyArg_ParseTuple(args, ""D:myfunction"", &c);"
12
extending/extending,,:set,"if (PyArg_ParseTuple(args, ""O:set_callback"", &temp)) {"
13
extending/newtypes,,:call,"if (!PyArg_ParseTuple(args, ""sss:call"", &arg1, &arg2, &arg3)) {"
14
faq/programming,,:chr,">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr("
15
-faq/programming,,::,for x in sequence[::-1]:
16
faq/programming,,:reduce,"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,"
17
faq/programming,,:reduce,"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,"
18
faq/windows,,:d48eceb,"Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32"
0 commit comments