Python

How To Get Started With the Requests Library in Python — step-by-step Python tutorial on Progressive Robot

How To Get Started With the Requests Library in Python

In many web apps, it’s normal to connect to various third-party services by using APIs. You can also use APIs to add functionality to your app. In this article, we’ll learn about the Python Requests library, which allows you to send HTTP requests in Python.

Read more
How to Get File Extension in Python — step-by-step Python tutorial on Progressive Robot

How to Get File Extension in Python

We can use [Python os module](/community/tutorials/python-os-module) splitext() function to get the file extension. This function splits the file path into a tuple having two values – root and extension. Getting File Extension in Python Here is a simple program to get the file extension in Python. import os # unpacking the tuple file_name, file_extension = […]

Read more
Cómo indexar y segmentar cadenas en Python 3 — step-by-step Python tutorial on Progressive Robot

Cómo indexar y segmentar cadenas en Python 3

Los tipos de datos cadena de Python es una secuencia formada por uno o más caracteres individuales que consisten en letras, números, caracteres de espacio en blanco o símbolos. Las cadenas son secuencias y se puede acceder a ellas de la misma manera que a otros tipos de datos basados en secuencias, mediante la indexación y la segmentación. Este tutorial explicará cómo acceder a las cadenas a través de la indexación y cómo segmentarlas en secuencias de caracteres. Asimismo, cubrirá los métodos de

Read more
Python String Functions — step-by-step Python tutorial on Progressive Robot

Python String Functions

URL: https://www.progressiverobot.com/python-string-functions/ Python provides a lot of built-in functions to manipulate strings. Python String is immutable, so all these functions return a new string and the original string remains unchanged. Python String Functions There are many functions to operate on String. However, it's not feasible to remember all of them. So here I am dividing […]

Read more
How To Secure Your Django Application with a Content Security Policy — step-by-step Python tutorial on Progressive Robot

How To Secure Your Django Application with a Content Security Policy

Websites use various services, styles, scripts, and images to load and render content, and the browser will execute all of it. Using a Content Security Policy (CSP) can help ensure that users are protected from malicious code. In this tutorial, you’ll implement a CSP in a basic Django app, customizing the CSP to allow certain domains and inline resources to run. You’ll also set up Sentry to log violations.

Read more
How To Define Functions in Python 3 — step-by-step Python tutorial on Progressive Robot

How To Define Functions in Python 3

A function is a block of instructions that, once defined, both performs an action once the function is called and makes that action available for later use. Functions make code more modular, allowing you to use the same code over and over again. In this tutorial, we’ll go over how to define your own functions to use in your coding projects.

Read more
Understanding Class Inheritance in Python 3 — step-by-step Python tutorial on Progressive Robot

Understanding Class Inheritance in Python 3

This tutorial will go through some of the major aspects of inheritance in Python, including how parent classes and child classes work, how to override methods and attributes, how to use the super() function, and how to make use of multiple inheritance.

Read more
CHAT