Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
remove the items at the index position from list `ind`
+2
Author: Lothar
Dark
Public
Save
PY
py
1
2
3
4
5
6
# remove the items at the index position from list
`ind`
a =
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
]
ind =
[
0
,
2
,
1
]
# instead of range
for
i
in
sorted
(
ind
,
reverse=
True
):
a.pop
(
i
)
print
(
a
)
Enter to Rename, Shift+Enter to Preview
OUTPUT