GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — AdvancedPython2022/filter_python.py at main · programmingwithmohammed/AdvancedPython2022 Expand file tree/ Copy pathfilter_python.pyMore file actions 18 lines (13 loc) · 412 Bytes / Copy pathfilter_python.pyFile metadata and controls18 lines (13 loc) · 412 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # -*- coding: utf-8 -*- """ Created on Thu Nov 18 10:13:09 2021 @author: mjach """ my_numbers = [1,2,3,4,5,6,7,8] # def find_even_number(num): # if num % 2 == 0: # return True # return False # print('Finding even number:', list(filter(find_even_number,my_numbers))) #Example 2 print('Finding the even number using the lambda function:',list(filter(lambda num : (num % 2 == 0),my_numbers))) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |