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
self-numbering ranking list
0
Author: Vanessa Nilsson
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
8
9
10
element =
input
()
index =
int
(
input
())
li =
[
"Pine"
,
"Wood"
,
"Car"
,
"House"
]
newlist = li
[:
index
]
newlist.append
(
element
)
newlist += li
[
index
:]
print
(
newlist
)
Enter to Rename, Shift+Enter to Preview
OUTPUT