Byte
In this Byte we'll be taking a look at HTTP request headers in Flask. They can carry important information between the client and the server, and understanding how to access them is needed for most any dynamic web application. What are HTTP request headers and why use them? HTTP headers...
Scott Robinson
In Python, variables declared outside of the function or in global space are known as global variables. These variables can be accessed by any function in the program. However, there may be instances where you want to delete or change a global variable within a function. This byte will guide...
Let's say you have a list of home addresses and want to see which ones reside on a "Street", "Ave", "Lane", etc. Given the variability of physical addresses, you'd probably want to use a regular expression to do the matching. But how do you...
Working with any language, you've probably come across warnings - and lots of them. In Python, our warnings are the yellow-highlighted messages that appear when code runs. These warnings are Python's way of telling us that, while our code is technically correct and will run, there's something in it that's...
Article
When dealing with large amounts of data or files, you might find yourself needing to compress files into a more manageable format. One of the best ways to do this is by creating a zip archive. In this article, we'll be exploring how you can create a zip archive of...
Python provides some very convenient ways to work with file-like objects, including the with feature. But what if we need to open multiple files in this way? Your could wouldn't exactly be "clean" if you had a bunch of nested with open statements. In this article, we'll show...
Python, somewhat similar ot Node, uses a system of installed modules/packages. But as you continue to install more and more modules, it might get a bit tricky to keep track of all of them. In this Byte, we'll explore how to get a list of all locally installed Python...
Python is not necessarily known for its speed, but there are certain things that can help you squeeze out a bit more performance from your code. Surprisingly, one of these practices is running code in a function rather than in the global scope. In this article, we'll see why Python...
Handling string data is a task that most software has to do in some capacity. These strings aren't always properly formatted, like those that may have a trailing newline that doesn't actually add any value to the sring and could be removed. This Byte will introduce you to the basics...
© 2013-2024 Stack Abuse. All rights reserved.