Based in Maryland, Mathwizurd.com is REVOLUTIONIZINg the world, one post at a time. With topics ranging from Biology to Multivariable Calculus, this website covers the entire academic spectrum.

Jan 3 Cool Python Features

While looking at the "Hidden Features of Python" page on StackOverflow, I found some really cool ones, and I wanted to share the coolest 8 with you. There are a bunch of other cool ones, so check out the page above.

Instead of regular formatting, which puts the text in a separate format, named formatting replaces the formatted words with the result. You can also do this with variables already in your file by doing print("example"%locals())

Operator Overloading for Set Operations

This is pretty cool; You can make a list a set, which makes it a list of all distinct values. Here are the operations: