Pawandeep has Published 50 Articles

Palindrome in Python: How to check a number is palindrome?

pawandeep

pawandeep

Updated on 11-Mar-2021 12:25:51

394 Views

What is a palindrome?A palindrome is a string that is the same when read from left to right or from right to left. In other words, a palindrome string is the one whose reverse is equal to the original string.For example, civic, madam are palindromes.Cat is not a palindrome. Since ... Read More

How do I create an automatically updating GUI using Tkinter in Python?

pawandeep

pawandeep

Updated on 11-Mar-2021 09:48:42

10K+ Views

GUI window has many controls such as labels, buttons, text boxes, etc. We may sometimes want the content of our controls such as labels to update automatically while we are viewing the window.We can use after() to run a function after a certain time. For example, 1000 milliseconds mean 1 ... Read More

How to convert list to dictionary in Python?

pawandeep

pawandeep

Updated on 11-Mar-2021 09:46:37

1K+ Views

The list is a linear data structure containing data elements.Example1, 2, 3, 4, 5, 6Dictionary is a data structure consisting of key: value pairs. Keys are unique and each key has some value associated with it.Example1:2, 3:4, 5:6Given a list, convert this list into the dictionary, such that the odd ... Read More

How to Convert Text to Speech in Python?

pawandeep

pawandeep

Updated on 11-Mar-2021 09:35:03

505 Views

Converting Text to Speech basically refers to a program where you give input as a text and the output you receive is the input text in the form of a speech.Python offers the text to speech conversion with the help of APIs. One such API which serves this purpose is ... Read More

What is an object in Python? Explain with examples

pawandeep

pawandeep

Updated on 11-Mar-2021 09:34:41

3K+ Views

A python is an object-oriented programming language. Almost everything in Python is considered as an object. An object has its own properties(attributes) and behavior(methods).A class is a blueprint of the objects or can be termed as object constructor for creating objects.One class can have many objects and value of properties ... Read More

Explain Merge Sort in Python

pawandeep

pawandeep

Updated on 11-Mar-2021 09:34:13

610 Views

Merge sort is a sorting technique. It is an efficient sorting algorithm with a time complexity of (n logn) where n is the length of the array to be sorted.Merge sort is an algorithm that follows the Divide and Conquers paradigm. It continuously divides the array into two equal halves. ... Read More

Explain Python Matrix with examples

pawandeep

pawandeep

Updated on 11-Mar-2021 09:28:16

2K+ Views

A matrix in Python is a two-dimensional array having a specific number of rows and columns. The data elements in Python matrix can be numbers, strings or symbols etc.Matrix or two-dimensional list is an important data structure. Various operations associated with matrix involve transpose, addition or multiplication of two matrices.We ... Read More

How to remove an element from a list in Python?

pawandeep

pawandeep

Updated on 11-Mar-2021 09:27:14

612 Views

A list in Python is a linear data structure where elements are stored in contiguous memory locations and elements are accessed by their indexes.We may sometimes need to remove an element from a list in Python. There are various inbuilt functions to achieve this.pop()This deletes or removes the element at ... Read More

Explain Stack in Python with examples

pawandeep

pawandeep

Updated on 11-Mar-2021 09:26:29

602 Views

A stack is a linear data structure that works on the Last In First Out mechanism(LIFO). The element which enters first in the stack is the last to be processed.ExampleThe stack data structure can be understood with the help of the example of a stack of dishes.The dishes are piled ... Read More

What is Queue in Python? Explain with examples

pawandeep

pawandeep

Updated on 11-Mar-2021 09:26:04

200 Views

A queue is a linear data structure that works on the First In First Out mechanism(FIFO).The element which enters first in the queue is the first to be processed.ExampleThe queue data structure can be understood with the help of a queue at a bus stand. The person who reaches first ... Read More

Advertisements