Convert List to String Python | Comma | Space | Join | Map

Convert List to String Python have many ways to do. The most common way by using,’ ‘.join(list_name) where join() is a string method and takes a list of items (Numbers or Strings) to join with the string. In this tutorial, we will look one by one how to Convert List to String Python. How to Convert List Read More…


Convert string to int or float Python | string to number

Convert string to int Python is different from other programming languages like Java, c and etc. Python doesn’t implicitly typecast strings to Integer(numbers). Python has standard built-in int()and functionfloat( ) is to convert a string into an integer or float value. Call it with a string containing a number as the argument, and it returns the number converted Read More…


Python Enumerate Function | Why this is useful? 

Python Enumerate Function is a generator that adds an incremental index next to each item of an iterable. In short, it produces the elements of an iterator, as well as an index number in the form of tuples. Enumerate function is inbuilt python, you don’t need to import any module for it. So for each element in,cursor Read More…


Convert int to string Python | Format | Examples

Convert int to string Python is not the same as other programming languages. Like Java and other language provide a typecasting but in python doesn’t implicitly typecast integer or float or numbers to strings in the condition of concatenating with strings. Because a python number exists in the place of the integer so this topic can be called Read More…


Python Substring | Slicing & Splitting String | Examples

Slicing or Splitting a string in Python and get substring is easy. You can get python substring by using a split() function or do with Indexing. Indexing is a very important concept not only with strings but with all the data types, such as lists, tuples, and dictionaries. When we create a string or sentence in python it’s Read More…


Python String Find() function | Examples

Python String find function returns the lowest index of the substring if the value (substring) found in given sentences. If it’s is not found then, it returns -1 integer value. The find() function similar to the index() function, The only difference is that the index() function throws an exception if the value is not found. In this tutorial, you Read More…


Python string index() Function | Get index of substring

Python string index() Function is determined if string substring occurs in a string (sentence) or in a substring of a string. This function is the same as find(), but throw an exception if str not found using index() function. In this tutorial, you will learn about index() function and some example of use. When you create Read More…


Python Format() Function | String Formatting

Python Format Function is used to allows multiple substitutions and value formatting. This function is in build in python, which provides functionality to concatenate elements within a string through positional formatting. In Python there is one more way to do formatting stings, the “Old Style” String Formatting (% operator). Syntax Using format function in python you don’t need any library Read More…


Python String Formatting | % Operator

Python String Formatting is used to replacement fields contained within a string to define how individual values are presented (like Example 22 is easy). Here is number 22 can be changed as per requirements. In this tutorial, you will learn about it, how to do it. In Python, there is two way to formatting strings. % operator Built-in format() function – Read More…


Python String Concatenation | Combine Strings

The string is an object in python, some cases you need a combined string. The one way to do it is Python String Concatenation with a ‘ + ” operator.  In a case where you want a merge a 2 string and store value in another variable then use new_String=  first_string + second_string. Python provides several ways Read More…