In this article, we will discuss how to sort an array in Python. An array is a collection of elements of the same data type. Output:
In this article, we will see how to shuffle a list in Python. There are more than one way to achieve this. We will see various methods for shuffling a list Using random.shuffle() In the random library of Python, there …
Ok, so you have written a Python code and now you want to save that code as a Python file for future references. This article will help you for the same, also for “how to save python program”. Assume that …
In this article, we will learn how to run Python programs on Sublime Text 3 editor. Sublime Text 3 Editor is a popular light weight, cross platform editor. I’ve created a simple addition function in sublime and saved it in …
Notepad ++ is a code editor. Here we’ll see how to run python program in notepad++. First download notepad++. Then click on file > new. Write the program and click run and write the path where python is stored in …
In Python, there are built-in methods for reversing a string. But sometimes you will be asked specifically to reverse a string without using any of the functions. In this article, we will learn to reverse a string without using reverse …
There are a few techniques to reverse a list. We will study them here. Using reverse() The reverse() reverses the items of the list. This is done “in place”, i.e., it does not create a new list. The syntax to …
In Python, it is possible to return multiple values from a function. In this article, we will learn to return multiple values from a function in Python Using Tuple: Output: Using list Output: Using Object Output:
Stopwords are English words which does not add much meaning to a sentence. They can be ignored without losing the meaning of the sentence NLTK(Natural Language Toolkit) in python has a list of stopwords stored in 16 different languages. We …
In this article, we will see how to remove space from string in Python. Using replace() Output: Using join() and split() method Output: Using Python regex Output: