Python String
- 17 November
Split String With Multiple Delimiters In Python
In this post, we will see how to split String with multiple delimiters in Python. Splitting a string in Python When we talk about splitting a string, it means creating a collection of sub-strings out of a string. We can split a string by a character and create a list of sub-strings. In Python, we […]
- 06 November
Convert String to Char array in Python
Strings are made up of characters. In python, we don’t have a character or char data type. All the characters are recognized as strings of length one. In this article, we will discuss different approaches to convert a string to a char array in python. We will also implement the programs to convert a string […]
- 28 October
Loop through String in Python
In this article, we will see how to loop through String in Python. Iteration or looping means executing a set of statements till a given condition is met. In Python, we can loop over data structures to access their elements. A string is like an array of characters. We can loop through a string and […]
- 01 October
How to get variable name as String in Python
In Python, there are several ways to convert a string to a variable name, but the reverse process is not exactly utilized so often in the programming world. This article focuses on how to get a variable name as a string in Python. What are variable names in Python? The term variable can be defined […]
- 31 May
Convert Hex to bytes in Python
1. Introduction to the Problem Statement In software development, converting hexadecimal (hex) strings to byte objects is a frequent requirement, especially when dealing with data formats and encoding. Hexadecimal, being a base-16 numeral system, offers a compact way to represent binary data, which is often needed in computational tasks. For instance, converting the hex string […]
- 23 May
Remove Comma from String in Python
💡 Outline You can remove comma from string in python by using string’sreplace() method. Syntax: [crayon-676e083a9e9a5417468273/] In this tutorial, we will take a sample string with a couple of commas in it and we will see some methods to remove comma from string in Python. Using replace() function to remove comma from string in Python […]
- 21 May
Add character to String in Python
Strings are considered as a sequence of characters in programming. In Python, string objects are considered immutable. What this means is that string objects cannot be changed once created, and a new string is created with a different block of memory when we edit a string. In this article, we will discuss how to add […]
- 16 May
Python find number in String
Extracting specific letters, phrases, words, and some specific characters is a very generic thing to do in the world of programming. In all these tasks, extraction of numbers and their occurrences from a string or a set of a string is also carried out very often by the user. Users can carry this task in […]
- 13 April
How to Format Float to 2 Decimal Places in Python?
In this article you will learn - How to Format a Float With Two Decimal Places in Python?