Changes

Jump to: navigation, search

OPS435 Python Lab 4

30 bytes removed, 21:00, 11 February 2018
Create a Python Script Demonstrating Comparing Lists
def join_lists(l1, l2):
# join_lists will return a list that contains every value from both l1 and l2 inside it
def match_lists(l1, l2):
::*The match_lists() function should return a list that contains all values found in both lists
::*The diff_lists() function should return a list that contains all values which are not shared between both lists
::*The join_lists() function should return a list that contains all values from both setslists
::*All three functions should accept '''two arguments''' both are lists
::*The script should show the exact output as the samples
# Will output [0, 1, 2, 3, 4, 5, -2, -1]
print(match_lists(list1,list2))
# Will output [81, 9, 5, 6, 72]
print(diff_lists(list1,list2))
# Will output [1, 20, 3, 4, 105, 11-2, 12, 13, 14-1]
</source>
::3. Download the checking script and check your work. Enter the following commands from the bash shell.<source lang="bash">

Navigation menu