PROGRAMMING
Python
Python from your first script to code you can maintain. Start here if you have never programmed.
0 likes
Likes for this tutorial.
Python Dictionary Comprehensions: When They Help and When They Hurt
Level: Intermediate
A dictionary comprehension builds a dictionary in one line. Good for transforming, filtering and building lookups. Bad for nested logic, side effects and anything that needs error handling. Shorter code is not always better code.
5 min read
0 likes
Likes for this tutorial.
Python if __name__ == "__main__": What It Does and When You Need It
Level: Intermediate
Importing a file runs it. if __name__ == "__main__" keeps a file's script part from running when another file imports it. Use it with a main() function, and know the cases where you don't need it.
4 min read