FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hackerrank-python/basic-data-types/Lists.py at master · anishLearnsToCode/hackerrank-python · GitHub
anishLearnsToCode
/
hackerrank-python
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
13
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hackerrank-python
/
basic-data-types
/
Lists.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (20 loc) · 611 Bytes
Breadcrumbs
hackerrank-python
/
basic-data-types
/
Lists.py
Copy path
File metadata and controls
23 lines (20 loc) · 611 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# https://www.hackerrank.com/challenges/python-lists/problem
queries
=
int
(
input
())
data
=
[]
for
_
in
range
(
queries
):
command
,
*
parameter
=
input
().
split
()
parameters
=
list
(
map
(
int
,
parameter
))
if
command
==
'insert'
:
data
.
insert
(
parameters
[
0
],
parameters
[
1
])
elif
command
==
'print'
:
print
(
data
)
elif
command
==
'remove'
:
data
.
remove
(
parameters
[
0
])
elif
command
==
'append'
:
data
.
append
(
parameters
[
0
])
elif
command
==
'sort'
:
data
.
sort
()
elif
command
==
'pop'
:
data
.
pop
()
elif
command
==
'reverse'
:
data
.
reverse
()
Back
|
FazBrowse Home
|
New Git URL