Keen Learner and Exp... • 3d
Day 17 of learning python as a beginner. Topic: lambda functions + email filter Lambda functions are a single line anonymous function without using the usual def key word. All function: checks whether all the key words (spam_keywords) are present in the email, that's why I have used "not in" function with it so the translation would be: check if all keywords not present in the email. If there is a single keyword present the condition will become false. I used this method to filter out the important emails. I used "any" function to check if any of the keyword is present in the email if present then the condition would be false and email will be treated as a spam. I know that I could have just used an if else condition instead of writing these two things separately however I purposefully wrote those two things seperately first to get familiar with "all" and "any" key word, second to know the effect of "not in" and "in" functions and third to write lambda function twice as a practice (sounds strange I know). I have then used File I/O to keep spammed emails and safe email in separate file for user review in future. As you can tell I tried to create a google like email filter and I think there's a lot more things I can add in this. I will appreciate any suggestion, challenge or future learning options (I still think I need to get my hand a better in modular programming). And here's my code and its result.
Keen Learner and Exp... • 20d
Day 2 of learning python as a beginner. Topic: Conditional Expression Conditional expression pose a condition (if and Else statements). They help program take decision based on the condition given. They can be used inside a function or while assign
See MoreHelping people achie... • 1m
Why are we still coding in programming languages when plain but exact English statements should be used to define what functions and methods should do. Just a vision: 1. Let everyone (not only developers) write modular functions with plain English d
See MoreKeen Learner and Exp... • 10d
Day 11 of learning python as a beginner. Topic: creating journal entry program using file I/O. I got a little sidleline from my original plan of editing my to-do list program and created an entirely new program this time for writing a daily journal
See MoreHey I am on Medial • 7m
I have a solution of pollution with scientific report and patent in which all vehicles will filter air by themselves. But nobody is willing to even tallk to me . I am searching for a platform to present this world saving project. If you know any plea
See MoreDownload the medial app to read full posts, comements and news.