Found 10784 Articles for Python

Python - K length Combinations from given characters

Asif Rahaman
Updated on 18-Jul-2023 14:09:06

227 Views

K length combinations from given characters mean the combinations of characters that we can create with the given characters, which are exactly of length k. In this article, we will explore several methods to achieve this, like recursion, map and lambda function, itertools library, etc. While recursion and lambda functions are custom functions, the itertools provide the in-built method to generate the combinations. Using Recursion Recursion is one of the traditional programming techniques. In this technique, we try to break a large problem into smaller chunks of problems, and our motive is to solve the smaller problems to solve ... Read More

Python - Get Function Signature

Asif Rahaman
Updated on 18-Jul-2023 14:07:06

1K+ Views

Understanding function signatures in Python is essential for unraveling the inner workings of functions. The inspect module offers a range of methods to retrieve signatures, allowing you to analyze parameters, access data types, and determine default values. By exploring these techniques, you can gain valuable insights that enhance code readability, maintainability, and documentation. So, dive into the world of function signatures and unlock a deeper understanding of your Python code. Using inspect Method The inspect method provides a powerful way to retrieve the function signatures. This method enables us to access detailed information about a function's parameters, data types, default ... Read More

Python - Get Even indexed elements in Tuple

Asif Rahaman
Updated on 18-Jul-2023 14:05:32

146 Views

The Tuple is one of the most important data types in Python. They are exclusively used as the data structures to pass sequential data as the parameters of any method. Indexing refers to accessing the elements of the sequential data through the index. In this article, we will learn how to get an even index in elements of Tuple. Use The List And range Expression. The mutable lists sequences of data separated by ", " and enclosed by "[ ]". Python allows the conversion between the lists and the Tuples through the in-built methods. We can traverse the lists and ... Read More

Locator Strategies in Selenium Python

Siva Sai
Updated on 18-Jul-2023 18:51:06

155 Views

One of the most frequent tasks in web automation and testing is finding objects on a webpage. There are several ways to locate components with Selenium WebDriver, a potent tool for programmatically managing a web browser. The many locator strategies in Selenium Python will be covered in this post, with examples to help you along the way. Introduction The first step in using Selenium WebDriver to interact with a web element on a webpage, such as clicking a button or typing text into a textbox, is to locate the element. Eight alternative locators, or methods, are supported by selenium for ... Read More

How to Replace the Kth word in a String using Python?

Asif Rahaman
Updated on 18-Jul-2023 14:03:32

118 Views

Strings are important data types in Python. Strings can be defined as the sequence of characters. Replacing the kth word in a String is an operation in which we want to replace the word which appears kth times in a String. In this article we will follow several methods to achieve it. We would look into the brute force method like using the loop statement, modules and libraries like re etc. Using Loop and split Method Loops are very common statements in most of the modern programming languages. We can either use the for or while loop to iterate over ... Read More

Locating single elements in Selenium Python

Siva Sai
Updated on 18-Jul-2023 18:50:09

191 Views

Selenium is a powerful automation tool that enables programmatic control of a web browser. It is crucial for automating web applications for various functions, including testing. Finding items on a webpage is an essential Selenium feature. In this article, we'll look at utilising Python to find specific Selenium bits. Introduction to Selenium A well-known open-source web-based automation tool is Selenium. Because of its adaptability, developers can create scripts using a variety of computer languages, including Python, Java, C#, and others. Selenium makes it possible to automate actions that you would ordinarily perform with a browser, like clicking, typing, choosing, and ... Read More

How to Get the list of Running Processes using Python?

Asif Rahaman
Updated on 18-Jul-2023 14:01:34

4K+ Views

The operating system runs with hundreds of tasks/process at a single time. As a Python developer, this is important because often while dealing with programs that consume huge amounts of memory, we may want to delete some unimportant tasks. This article will explore how to get the running process list using Python. Using psutil Module The psutil module is a powerful cross−platform library for system monitoring and process management in Python. It provides a convenient and consistent API to access system−related information, such as CPU usage, memory utilization, disk usage, network statistics, etc. Being cross−platform, the same code applies to ... Read More

Locating multiple elements in Selenium Python

Siva Sai
Updated on 18-Jul-2023 18:49:08

290 Views

Selenium is an effective tool for remotely manipulating a web browser. It works well for testing purposes when automating web applications. Finding items on a webpage is a crucial Selenium feature. In this lesson, we'll concentrate on utilising Python to find numerous Selenium items. Introduction to Selenium A well-known open-source web automation tool is Selenium. It gives programmers a means to create scripts in a variety of languages, including Python, Java, C#, etc. With Selenium, you can automate any browser-related actions, including clicking, typing, selecting, and navigating. Setting Up Selenium It's essential to make sure Selenium is properly configured and ... Read More

Loan Eligibility Prediction using Machine Learning Models in Python

Siva Sai
Updated on 18-Jul-2023 18:48:08

689 Views

Predicting loan eligibility is a crucial part of the banking and finance sector. It is used by financial institutions, especially banks, to determine whether to approve a loan application. A number of variables are taken into consideration, including the applicant's income, credit history, loan amount, education, and employment situation. In this post, we will demonstrate how to predict loan eligibility using Python and its machine learning modules. We'll introduce some machine learning models, going over their fundamental ideas and demonstrating how they can be used to generate predictions. Step 1: Understand the Problem Predicting whether a loan will be accepted ... Read More

Loan Calculator using PyQt5 in Python

Siva Sai
Updated on 18-Jul-2023 18:44:28

236 Views

Welcome to this thorough article on using PyQt5 in Python to build a Loan Calculator. The PyQt5 library's robust features can be used to provide a straightforward and approachable user interface for our calculator. This post will provide a thorough explanation of how to build such a calculator, along with real-world examples to help make the process more understandable. Introduction to PyQt5 Cross-platform apps can be made using PyQt5, a set of Python bindings for Qt libraries. It combines the greatest features of Python and Qt and gives developers the freedom to create code in Python while utilising the extensive ... Read More

Advertisements