Python Inner Functions: What Are They Good For?

Inner functions, also known as nested functions, are functions that you define inside other functions. In Python, this kind of function has direct access to variables and names defined in the enclosing function. Inner functions have many uses, most notably as closure factories and decorator functions. In this tutorial, you’ll learn how to: Provide encapsulation and hide your functions from external access Write helper functions to facilitate code reuse Create closure factory functions that retain state between calls Code decorator […]

Read more

Python Modulo: Using the % Operator

Python supports a wide range of arithmetic operators that you can use when working with numbers in your code. One of these operators is the modulo operator (%), which returns the remainder of dividing two numbers. Modular operations are useful to check if a number is even or odd, simplifying cycling through data, and doing non-decimal based units conversion. In this course, you’ll learn: How modulo works in mathematics How to use the Python modulo operator with different numeric types […]

Read more

Python Microservices With gRPC

Microservices are a way to organize complex software systems. Instead of putting all your code into one app, you break your app into microservices that are deployed independently and communicate with each other. This tutorial teaches you how to get up and running with Python microservices using gRPC, one of the most popular frameworks. Implementing a microservices framework well is important. When you’re building a framework to support critical applications, you must ensure it’s robust and developer-friendly. In this tutorial, […]

Read more

Pandas Sort: Your Guide to Sorting Data in Python

Learning pandas sort methods is a great way to start with or practice doing basic data analysis using Python. Most commonly, data analysis is done with spreadsheets, SQL, or pandas. One of the great things about using pandas is that it can handle a large amount of data and offers highly performant data manipulation capabilities. In this tutorial, you’ll learn how to use .sort_values() and .sort_index(), which will enable you to sort data efficiently in a DataFrame. By the end […]

Read more

Creating PyQt Layouts for GUI Applications

PyQt’s layout managers provide a user-friendly and productive way of arranging graphical components, or widgets, on a GUI. Laying out widgets properly will make your GUI applications look polished and professional. Learning to do so efficiently and effectively is a fundamental skill for you to get up and running with GUI application development using Python and PyQt. In this course, you’ll learn: What the benefits are of using PyQt’s layout managers How to programmatically lay out widgets on a GUI […]

Read more

Functional Programming in Python: When and How to Use It

Functional programming is a programming paradigm in which the primary method of computation is evaluation of functions. In this tutorial, you’ll explore functional programming in Python. Functional programming typically plays a fairly small role in Python code. But it’s good to be familiar with it. At a minimum, you’ll probably encounter it from time to time when reading code written by others. You may even find situations where it’s advantageous to use Python’s functional programming capabilities in your own code. […]

Read more

Python & APIs: A Winning Combo for Reading Public Data

Knowing how to consume an API is one of those magical skills that, once mastered, will crack open a whole new world of possibilities, and consuming APIs using Python is a great way to learn such a skill. A lot of apps and systems you use on a daily basis are connected to an API. From very simple and mundane things, like checking the weather in the morning, to more addictive and time-consuming actions, such as scrolling through your Instagram, […]

Read more

Dictionaries and Arrays: Selecting the Ideal Data Structure

There are a variety of ways of storing and managing data in your Python programs, and the choice of the right data structure will affect the readability of your code, ease of writing, and performance. Python has a wide variety of built-in mechanisms that meet most of your data structure needs. This course introduces you to two types of data structures: dictionaries and arrays. There are multiple types and classes for both of these data structures and this course discusses […]

Read more

Brython: Python in Your Browser

If you’re a web developer who prefers writing Python over JavaScript, then Brython, a Python implementation that runs in the browser, may be an appealing option. JavaScript is the de facto language of front-end web development. Sophisticated JavaScript engines are an inherent part of all modern Internet browsers and naturally drive developers to code front-end web applications in JavaScript. Brython offers the best of both worlds by making Python a first-class citizen language in the browser and by having access […]

Read more

Python and MongoDB: Connecting to NoSQL Databases

Python is a powerful programming language used for many different types of applications within the development community. Many know it as a flexible language that can handle just about any task. So, what if our complex Python application needs a database that’s just as flexible as the language itself? This is where NoSQL, and specifically MongoDB, come in to play. Throughout this article we’ll show you how to use Python to interface with the popular MongoDB (v3.4.0) database, along with […]

Read more
1 9 10 11 12