programming tip


If you are a maths freak, you would surely love this next tip. You may have used sets in your lower classes. Remember something? Yeah, exactly, Unions and stuff. So, there are people like me who don’t like to use automated softwares sometimes. The reason for that is Security. Let’s take a simple example of Microsoft Excel. Some people tend to use excel only to the group and create a database. They just need that and good security for that. They are not interested in formatting the text, colour and stuff. So, what I do at those times, is I create my own python Programming software stack and create my own database. For some of my security reasons, I prefer Python over MYSql. So, coming back to my point of sets, Sets are extremely useful when creating databases. Especially when you want to find matches, create groups and other similar tasks. Following is a simple example of that.

A = {1, 2, 3, 3} A set([1, 2, 3]) B = {3, 4, 5, 6, 7} B set([3, 4, 5, 6, 7]) A | B set([1, 2, 3, 4, 5, 6, 7]) A & B set([3]) A - B set([1, 2]) B - A set([4, 5, 6, 7]) A ^ B set([1, 2, 4, 5, 6, 7]) (A ^ B) == ((A - B) | (B - A)) True