- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10784 Articles for Python
9K+ Views
Machine learning algorithms have revolutionized the way we extract valuable insights and make informed decisions from vast amounts of data, among the multitude of algorithms, the Find-S algorithm stands out as a fundamental tool in the field. Developed by Tom Mitchell, this pioneering algorithm holds great significance in hypothesis space representation and concept learning. With its simplicity and efficiency, the Find-S algorithm has garnered attention for its ability to discover and generalize patterns from labeled training data. In this article, we delve into the inner workings of the Find-S algorithm, exploring its capabilities and potential applications in modern machine ... Read More
108 Views
In Python, we can split a string into substrings using the split() method. The split() method is one of the built-in Python string methods that splits a string into a list of substrings based on a specified delimiter. In this article, we will learn how to split strings into substrings with the help of Examples. Splitting String into Substring Method 1: Using the split() method The split() method is a built-in method of strings in Python that splits a string into a list of sub-strings based on a specified delimiter. The delimiter can be any character or string that ... Read More
19K+ Views
In Python, we can easily replace a character at a specific index by converting the string into a list of characters using the list() method. Then, we modify the character at the desired index and convert the list back to the string using the join() method. We can also replace a character at a specific index using the slicing and replace method. In this article, we will see examples of replacing a character at a specific index in Python using list and join method, the slicing method and replace method. Method 1: Using list() and join() method Syntax The list() ... Read More
293 Views
Techniques for feature selection play a vital role in the field of machine learning as they are responsible for identifying the most pertinent and informative features that contribute to model training. In this article, we will delve into a variety of methods employed to select a subset of features from a vast pool of variables. These techniques not only enhance model performance and reduce computational complexity but also improve interpretability. Beginning with traditional approaches like a filter, wrapper, and embedded methods, we will explore advanced algorithms such as genetic algorithms and deep learning-based techniques. What is Feature Selection? Feature ... Read More
2K+ Views
Regex library in Python is used for pattern matching and manipulation of text data. We can print the first letter of each word using regex by identifying a new word after spaces using its pattern-matching functionality. In this article, we will implement a program to print the first letter of each word using regex. Regular Expressions Regular expression or regex is a tool for pattern matching in text. They are a sequence of characters that define a search pattern. They are widely used in programming, particularly in text processing, and are supported by most programming languages, including Python. Printing ... Read More
3K+ Views
A Unicode code point is a unique number that represents a number in the Unicode character set. Unicode is a character encoding standard that is used to assign unique codes to every character in the world. Unicode supports around 130, 000 characters including letters, symbols, and emojis.We can determine the Unicode Code point at a specific index using the ord() function, codecs module in Python, unicodedata module, and array module in Python. In this article, we will discuss how we can determine the Unicode code point at a given index using all these methods. Unicode Code Point According to ... Read More
2K+ Views
We can compare two strings lexicographically in Python using comparison operators like '', '==', ' string2[i]: print(string2, "comes before", string1) break i += 1 else: if len(string1) < len(string2): print(string1, "comes before", string2) elif len(string1) > len(string2): print(string2, "comes before", string1) else: print("The two strings are equal") Output apple comes before banana Example In the below ... Read More
5K+ Views
Pandas dataframe can be saved in gzip/zip format using the gzip and zipfile module in Python. Pandas is a Python library that is used for data manipulation and analysis. It provides a two-dimensional labeled data structure with columns of potentially different data types. To reduce the size of the data frame we need to store it in gzip/zip format. In this article, we will understand how we can save Pandas Dataframe as gzip/zip file. Algorithm A generalized algorithm to save a Pandas DataFrame as a compressed gzip/zip file is written below. However, the exact implementation of this algorithm may vary ... Read More
4K+ Views
Ngrok is a tool that is used to create a secure tunnel between your local machine and the internet. It is used to test the web application and allows developers to expose their local web server to the internet without having to deploy it to a remote server. Python Flask allows you to create web applications locally but we might want to showcase it to the world by running it online. In this article, we will use the Ngrok tool to run the web application online without hosting it on any server. The Steps to Run Python Flask App Online ... Read More
8K+ Views
The subprocess module can be used to run multiple Python files in a folder one after another. Running multiple files one after another is required in various situations like when processing large data sets or performing complex analysis. In this article, we will discuss the steps involved in running multiple Python files in a folder sequentially with examples. Method 1: Using the subprocess() method Steps for creating and running multiple Python files sequentially Step 1: Create multiple Python files to run We need to have three Python files in a folder to run them sequentially. So the first step ... Read More