Convert Decimal to String in Python Last Updated : 28 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing the information about converting decimal to string. Converting Decimal to String str() method can be used to convert decimal to string in Python. Syntax: str(object, encoding=’utf-8?, errors=’strict’) Parameters: object: The object whose string representation is to be returned. encoding: Encoding of the given object. errors: Response when decoding fails. Example 1: Python3 from decimal import Decimal dec = Decimal(10) print(dec, type(dec)) # Converting to string dec = str(dec) print(dec, type(dec)) Output: 10 <class 'decimal.Decimal'> 10 <class 'str'> Example 2: Python3 from decimal import Decimal dec = Decimal("0.01") print(dec, type(dec)) # Converting decimal to string s = str(dec) print(s, type(dec)) Output: 0.01 <class 'decimal.Decimal'> 0.01 <class 'decimal.Decimal'> Comment More infoAdvertise with us Next Article Convert Set to String in Python D deepanshumehra1410 Follow Improve Article Tags : Python python-string python-basics Practice Tags : python Similar Reads Convert Hex to String in Python Hexadecimal (base-16) is a compact way of representing binary data using digits 0-9 and letters A-F. It's commonly used in encoding, networking, cryptography and low-level programming. In Python, converting hex to string is straightforward and useful for processing encoded data.Using List Comprehens 2 min read Convert String to Int in Python In Python, converting a string to an integer is important for performing mathematical operations, processing user input and efficiently handling data. This article will explore different ways to perform this conversion, including error handling and other method to validate input string during conver 3 min read Convert String to Long in Python Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing information about converting a string to long. Converting String to long A long is an integer type value that has unlimited length. By converting a string into long we are transl 1 min read Convert integer to string in Python In this article, weâll explore different methods for converting an integer to a string in Python. The most straightforward approach is using the str() function.Using str() Functionstr() function is the simplest and most commonly used method to convert an integer to a string.Pythonn = 42 s = str(n) p 2 min read Convert Set to String in Python Converting a set to a string in Python means changing a group of unique items into a text format that can be easily read and used. Since sets do not have a fixed order, the output may look different each time. For example, a set {1, 2, 3} can be turned into the string "{1, 2, 3}" or into "{3, 1, 2}" 2 min read Convert String to Set in Python There are multiple ways of converting a String to a Set in python, here are some of the methods.Using set()The easiest way of converting a string to a set is by using the set() function.Example 1 : Pythons = "Geeks" print(type(s)) print(s) # Convert String to Set set_s = set(s) print(type(set_s)) pr 1 min read Like