Topics

Python String

About this topic: Articles tagged __TAG__

Showing 136 articles

Topics

Articles

Showing 136 articles

How-tos How to Escape Curly Braces Using format() in Python This tutorial demonstrates to escape curly brackets in Python using the format() method. How-tos How to Escape Curly Braces in F-String in Python This tutorial demonstrates how to print curly brackets in output in Python. How-tos How to Generate Password in Python In this article, we discussed the two modules, i.e., Secrets and Random modules, that help us to generate passwords in Python. Both modules have a similar function to generate … How-tos How to Split String Based on Multiple Delimiters in Python How to split a string into a list in Python 2.7/Python 3.x based on multiple delimiters/separators/arguments or by matching with a regular expression. It includes regular … How-tos How to Check a String Contains a Number in Python Python any function together with str.isdigit could check whether a string contains a number or not; re.search function checks a string contains a number even faster than the above … How-tos How to Convert String to Float or Int in Python This tutorial introduces how to convert string to float or int in Python 2.7 and Python 3 How-tos How to Convert Bytes to String in Python 2 and Python 3 This tutorial introduces how to convert bytes to string in Python 2.7 and Python 3, including decode and chr methods in Python 3.x. How-tos How to Check Whether a String Contains Substring in Python This tutorial introduces multiple ways to check whether a string contains a specific substring How-tos How to Convert String to Lowercase in Python 2 and 3 It demonstrates how to convert a string or an unicode string to lowercase in Python 2 and 3 How-tos How to Convert String to Datetime in Python It demonstrates how to convert string to datetime in Python How-tos How to Remove Whitespace From a String in Python It introduces different methods of removal of whitespace in a string. You could strip the whitespace either with Python string split, replace method, or use Python regex functions. How-tos How to Remove Commas From String in Python To remove comma from a string in Python, we can use the str.replace() method and the re package. How-tos Ways to Remove xa0 From a String in Python This article demonstrates the methods on how to remove xa0 from a string in Python. How-tos String Interpolation in Python Learn about the String Interpolation in Python How-tos Difference Between %s and %d in Python String Formatting This tutorial introduces the difference between %s and %d in Python string formatting. How-tos __str__ vs __repr__ in Python This article discusses the difference between the __str__() method and the __repr__() method in python using some use cases and examples .

← All topics