Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 947df54

Browse files
Add files via upload
1 parent 521c603 commit 947df54

File tree

5 files changed

+48
-18
lines changed

5 files changed

+48
-18
lines changed

‎Section_03/assignment_01.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77

88
# your code below:
99

10-
def merge_lists(list_a, list_b):
11-
return list_a + list_b
1210

13-
print(merge_lists([1,2,3,4], ['a','b','c']))
11+
12+
13+
14+
15+
1416

1517

1618

‎Section_03/assignment_02.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
Make sure to test the function.
88
"""
99
# Your Code Below:
10-
def separate(str):
11-
return list(str)
1210

13-
print(separate("hello there"))
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
1422

1523

1624

‎Section_03/assignment_03.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,21 @@
1010
1111
"""
1212
# Your Code Below:
13-
def multi_merge(list_a, str):
14-
return list_a + str.split() + list(str)
1513

16-
print(multi_merge([1,2,3,4], "Hello My name is imtiaz"))
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
1728

1829

1930

‎Section_03/assignment_04.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414

1515
# Your code below:
1616

17-
def last_list(*args):
18-
return args[-1]
1917

2018

21-
print(last_list([1,2,3,4,5], ['a', 'b', 'c'], ['mike', 'john']))
19+
20+
21+
22+
23+
24+
25+
2226

2327

2428

‎Section_03/assignment_05.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515

1616
# Your Code Below:
1717

18-
def key_list_items(key, **kwargs):
19-
value_list = kwargs[key]
20-
return value_list[-2]
2118

22-
result = key_list_items("things", things=['book', 'tv', 'shoes'], people=['pete', 'mike', 'jan', 'tom'],
23-
ages=[20, 30, 40])
24-
print(result)
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
2530

2631

2732

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /