Question: ANWER THE FOLLOWING IN PYTHON AND PUT THE ANSWER IN THE QUESTION WHERE IT IS SUPPOSED TO BE : #!/usr/bin/python3 import unittest def func9(lis1, lis2):

ANWER THE FOLLOWING IN PYTHON AND PUT THE ANSWER IN THE QUESTION WHERE IT IS SUPPOSED TO BE :

#!/usr/bin/python3

import unittest

def func9(lis1, lis2):

'''

Assume lis1 and lis2 are lists of integers and/or lowercase letters.

Return a list of the combination of letters in the two lists in ascending order.

Note 1: No duplicates in the output

Note 2: Return None if the output is empty

Note 3: you may use isinstance(d, int) or isinstance(d, str) to check the type of d

Note 4: you may use sort() or sorted()

For example, func9(['b', 'a', 3], ['b', 2, 'a', 'a']) should return ['a', 'b']

func9([2, 3], [6, 5]) should return None

'''

# YOUR CODE GOES HERE

# YOUR CODE GOES ABOVE HERE

pass

# --------------------------------------------------------------

# The Testing

# --------------------------------------------------------------

class myTests(unittest.TestCase):

def test1(self):

self.assertEqual(func9([1, 2, 3, 'a', 'b', 'c'], [12, 13, 'b']), ['a', 'b', 'c'])

def test2(self):

self.assertEqual(func9([11, 'c', 'b', 'c'], ['a', 11, 'c']), ['a', 'b', 'c'])

def test3(self):

self.assertEqual(func9(['d', 'e', 2, 5, 3, 'a', 'b'], [3, 2, 'f']), ['a', 'b', 'd', 'e', 'f'])

def test4(self):

self.assertEqual(func9(['d', 'b', 2, 5, 3, 'a', 'b', 'd'], ['d', 'b', 'b']), ['a', 'b', 'd'])

def test5(self):

self.assertEqual(func9([5, 5], [2, 5, 3]), None)

if __name__ == '__main__':

unittest.main(exit=True)

# --------------------------------------------------------------

# The End

# --------------------------------------------------------------

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!