Learn coding in Python, Go and Rust from Serdar Yegulalp, software dev specialist and senior writer at InfoWorld.
Python's slice syntax lets you take portions of object collections, such as lists. Learn how to use slices efficiently and correctly, and avoid some of the gotchas associated with slicing.
Lists are a built-in data structure for Python for keeping together groups of objects in an ordered way. Here we'll cover the basics of the list object and how to perform common operations with it.
Python's decorator syntax gives you a convenient way to change the behaviors of functions without having to rewrite them, and reduce boilerplate in code. Learn the basics of the decorator syntax, and how to use them in your own applications.
Sometimes in Python programs you need to acquire external resources, like file handles, and then free them again. Python's context manager construction lets you automatically free things up when you're done with them, and in a way that lets you see at a glance the scope of what's used and when.
Everything in Python is an object. Learn how object properties -- which are actually just Python dictionaries under the hood -- can be leveraged to make your code smarter, more concise, and less riddled with boilerplate.
Python dictionaries make it easy to save and retrieve data by name at high speed. This video explores the fundamental concepts of how to use dictionaries effectively in your Python apps.
Dataclasses, new to Python 3.7, provide a simplified way to create classes that have common data initialization routines and methods. Learn how to reduce the amount of boilerplate in your Python classes by using the @dataclass decorator.
The f-string feature in Python lets you format output in strings by using convenient text templates. This walkthrough shows you the basics of how to use f-string formatting in your code.
Poetry provides an all-in-one tool for setting up projects, including virtual environments, dependency management, and many other moving parts. Learn the basics in our five-minute introduction.
The Pipenv tool takes the hassle out of managing a Python project's virtual environments and packages. Learn how to get rolling with it in our quick walkthrough.
Python's built in async functions allow you to run multiple operations not bound by CPU side by side, without blocking each other. This simple example shows how reading from websites can be greatly accelerated this way.
PyInstaller lets you take Python apps and turn them into stand-alone executables. Here's a quick runthrough of how it works. For more on PyInstaller, see www.pyinstaller.org.
The multiprocessing module in Python can be used to take CPU-dependent tasks and run them on multiple cores in parallel. Here's a simple example. The benchmark shown is a variation of one posted at https://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/
Learn how to use the "cProfile" module to analyze a Python program's performance and make strategic changes to it.
The "py" launcher lets you select which of multiple installed versions of Python to run. Here's how to use it to launch your scripts.
Why does the "black" code formatter for Python have no options at all? It's by design! Watch and learn why.
Django is among Python's most popular web framework packages. Here's how to get up and running with a simple project. Official Django site: https://djangoproject.com/
Cython allows math-heavy Python code to be transformed into C and run at many times its original speed. Here, we'll demonstrate graphically how this works.
The PyPy runtime for Python speeds up execution of many Python programs without rewriting.
How to set up and get started with the Python extension for Visual Studio Code.
Use the Flask web framework for Python to create a simple web application.
How to use Python's timeit function to profile the performance of small sections of code, such as functions or loops.
How to get Python installed and ready to use on the latest version of Windows.
How to install new versions of Python on Windows side-by-side with older versions.
How to use Pip, the Python package manager, to install, remove, and update packages in a Python installation.
How to set up a virtual environment for a newly created Python project.
Learn about the hottest programming language around -- what it can do for you, what it’s best for, and when it’s not a good choice.