Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskB_inlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SHAH DEVANSH
taskB_inlab
Commits
ff8b9eac
Commit
ff8b9eac
authored
Aug 23, 2016
by
SHAH DEVANSH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add task1.py
parents
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
task1.py
task1.py
+15
-0
task2.py
task2.py
+12
-0
No files found.
task1.py
0 → 100644
View file @
ff8b9eac
def
function1
(
string1
,
string2
,
listVariable
):
new_list
=
list
(
map
(
lambda
x
,
y
:(
x
,
y
),
string1
,
string2
))
new_list
=
listVariable
+
new_list
return
new_list
string1
=
"Devansh"
string2
=
"578643231"
print
(
"Original List Is:"
)
listVariable
=
[(
1
,
2
,
3
,
4
),
"Udayan"
,(
5
,
6
,
7
,
8
)]
print
(
listVariable
)
q
=
function1
(
string1
,
string2
,
listVariable
)
print
(
"Final List Is:"
)
print
(
q
)
\ No newline at end of file
task2.py
0 → 100644
View file @
ff8b9eac
def
function2
(
listVariable
,
n
):
new_list
=
list
(
map
(
lambda
x
:
x
[
n
],
listVariable
))
print
(
new_list
)
new_list
.
sort
()
return
new_list
'''
input=[(5,6,7,8),(1,2,3),(9,10,11,12),(13,14,15,16)]
output=function2(input,2);
print(output)
'''
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment