Category Archives: Python

Did You Know? Python’s Walrus Operator Can Make Your Code Cleaner

Did you know? Since Python 3.8, you can use the walrus operator ( := ) to assign a value to a variable as part of an expression. It’s a small piece of syntax that can meaningfully tidy up loops and … Continue reading

Posted in Python | Tagged | Leave a comment

Did You Know? Python Dictionaries Preserve Insertion Order

Did you know? Since Python 3.7, the built-in 1dict type officially preserves the order in which keys are inserted. Before that, if you needed ordering guarantees you had to reach for 1collections.OrderedDict . Today, a plain dictionary is enough for … Continue reading

Posted in Python | Tagged | Leave a comment

Python Sample Script

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990import re import ntpath import glob import subprocess # In order to get this tool to run correctly, you’ll need python installed (duh!) and graphviz basedir = "/home/ronald-dev/allBashScript/" ”’ This function will scan a bash file, and look for any … Continue reading

Posted in Python | Leave a comment