1,234
edits
Changes
→Create a Python Script Demonstrating Comparing Lists
=== Create a Python Script Demonstrating Comparing Lists ===
:'''Perform the Following Instructions'''
#!/usr/bin/env python3
print('diff: ', diff_lists(list1, list2))
</source>
run lab4b.py
list1: [1, 2, 3, 4, 5, 6, 7, 8, 9]
</source>
import lab4b
list1 = [1,2,3,4,5]
list2 = [2,1,0,-1,-2]
print(join_lists(list1,list2)))# Will output [0, 1, 2, 3, 4, 5, -2, -1]print(match_lists(list1,list2) ) # Will output [8, 9, 5, 6, 7]print(diff_lists(list1,list2) ) # Will output [1, 2, 3, 4, 10, 11, 12, 13, 14]
</source>
cd ~/ops435/lab4/
pwd #confirm that you are in the right directory
python3 ./CheckLab4.py -f -v lab4b
</source>
== PART 3 - Dictionaries ==