This repository belongs to problems stated in Assignment 3
1.1 Write a Python Program to implement your own myreduce() function which works exactly like Python's built-in function reduce()
1.2 Write a Python program to implement your own myfilter() function which works exactly like Python's built-in function filter()
-
Implement List comprehensions to produce the following lists. Write List comprehensions to produce the following Lists ['A', 'C', 'A', 'D', 'G', 'I', ’L’, ‘ D’] ['x', 'xx', 'xxx', 'xxxx', 'y', 'yy', 'yyy', 'yyyy', 'z', 'zz', 'zzz', 'zzzz'] ['x', 'y', 'z', 'xx', 'yy', 'zz', 'xx', 'yy', 'zz', 'xxxx', 'yyyy', 'zzzz'] [[2], [3], [4], [3], [4], [5], [4], [5], [6]] [[2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7], [5, 6, 7, 8]] [(1, 1), (2, 1), (3, 1), (1, 2), (2, 2), (3, 2), (1, 3), (2, 3), (3, 3)]
-
Implement a function longestWord() that takes a list of words and returns the longest one.
- Please refer Screenshot directory for output of Screenshot
- Please refer Sourcecode directory for Pyhton Sourcecode file