In Python, lists can be made by placing elements inside a square bracket[]. List doesn’t need a built-in function for creation. output: A list in Python can contain different type of data. Output:
ASCII (American Standard Code for Information Interchange) is a character encoding standard for text files. Each symbol in the character set can be represented by a Decimal value ranging from 0 to 127, as well as equivalent Hexadecimal and Octal values. To find the …
random() function of random module generates a random float number between 0.0 and 1.0. The actual range of random function is semi-open range [0.0, 1.0). import random random.random()
In this article, we will go through different methods to find the length of string in Python. Method 1: len() Output: Method 2: for loop Output: Method 3: while loop and slicing Output: Note that, len() is the most efficient …
In comparing lists, we are checking the data items of a list against equality with data items of another list. In this article, we will discuss different ways to compare two lists. Method 1: Using list comprehension Output: Method 2: …
Python packages make the language more unique and efficient. Apart from the inbuilt packages, there are too many external packages written and attached to Python. If you want to use these packages you simply have to install them. NumPy is …
XLSX file popularly known as Excel file is a spreadsheet which makes us easy to store data in a tabular form. Now the question is that how can we read data from the excel file while writing a python program? …
Speech Recognition is a process which converts speech into text and that is understood by the machine. In python there is a library by which we can make the machine to recognize human speech. Speech recognition saves our time by …
The word PYTHON- isn’t it scary? Does it bring the image of big reptile that we prefer to see either in jungles or zoo? Well, it’s time to change the image. Now on, you’ll remember word Python for its playfulness …
Python gives us freedom to take the input from the user. The input we take from the user is read as string by default. After giving input we have to press “Enter”. Then only the input() function reads the value …