Python

How To Use the Python Filter Function — step-by-step Python tutorial on Progressive Robot

How To Use the Python Filter Function

The Python built-in filter() function can be used to create a new iterator from an existing iterable (like a list or dictionary) that will efficiently filter out elements using a function that we provide. In this tutorial, we’ll review four different ways of using filter(): with two different iterable structures, with a lambda function, and with no defined function.

Read more
How To Use Web Forms in a Flask Application — step-by-step Python tutorial on Progressive Robot

How To Use Web Forms in a Flask Application

Flask is a lightweight Python web framework that provides useful tools and features for creating web applications in the Python Language. In this tutorial, you’ll build a small web application with Flask that demonstrates how to use web forms. The application will have a page for displaying messages that are stored in a Python list, and a page for adding new messages. You’ll also use message flashing to inform users of an error when they submit invalid data.

Read more
Loss Functions in Python - Easy Implementation — step-by-step Python tutorial on Progressive Robot

Loss Functions in Python – Easy Implementation

URL: https://www.progressiverobot.com/loss-functions-in-python/ Introduction Loss functions in Python are an integral part of any machine learning model. These functions tell us how much the predicted output of the model differs from the actual output. There are multiple ways of calculating this difference. In this tutorial, we are going to look at some of the more popular […]

Read more
Build and Deploy Your Personal Terminal ChatGPT Bot in Python with OpenAI APIs — step-by-step Python tutorial on Progressive Robot

Build and Deploy Your Personal Terminal ChatGPT Bot in Python with OpenAI APIs

URL: https://www.progressiverobot.com/openai-terminal-chatbot/ Introduction Conversational bots have become increasingly popular, providing an interactive way for users to engage with technology. OpenAI's "GPT" (Generative Pre-trained Transformer) models enable developers to create sophisticated conversational agents. In this tutorial, you will build and deploy your personal terminal ChatGPT bot using Python and OpenAI APIs on a cloud servers running […]

Read more
Python Command Line Arguments — step-by-step Python tutorial on Progressive Robot

Python Command Line Arguments

URL: https://www.progressiverobot.com/python-command-line-arguments/ Python Command line arguments are input parameters passed to the script when executing them. Almost all programming language provide support for command line arguments. Then we also have command line options to set some specific options for the program. Python Command Line Arguments There are many options to read python command line arguments. […]

Read more
Python getattr() — step-by-step Python tutorial on Progressive Robot

Python getattr()

URL: https://www.progressiverobot.com/python-getattr/ In our previous tutorial we learned about [python system command](/community/tutorials/python-system-command-os-subprocess-call). In this tutorial we will be discussing about Python getattr() function. Python getattr() function Python getattr() function is used to get the value of an object’s attribute and if no attribute of that object is found, default value is returned. Basically, returning the […]

Read more
Python Reverse String - 5 Ways and the Best One — step-by-step Python tutorial on Progressive Robot

Python Reverse String – 5 Ways and the Best One

URL: https://www.progressiverobot.com/python-reverse-string/ Python String doesn't have a built-in reverse() function. However, there are various ways to reverse a string in Python. 1. How to Reverse a String in Python? Some of the common ways to reverse a string are: Using [Slicing](/community/tutorials/python-slice-string) to create a reverse copy of the string. Using [for loop](/community/tutorials/python-for-loop-example) and appending characters […]

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

Python String Module

URL: https://www.progressiverobot.com/python-string-module/ Python String module contains some constants, utility function, and classes for string manipulation. Python String Module It's a built-in module and we have to import it before using any of its constants and classes. String Module Constants Let's look at the constants defined in the string module. import string # string module constants […]

Read more
CHAT