Understanding Python Dictionary Slicing – Detailed Tutorial with Examples and Problems

In this Tutorial we are going to discuses and understand Python Dictionary Slicing with examples and Problems, And all the possible Ways of slicing a list or dictionary. Understanding Slicing Before Understanding slicing, we need to know the indexing in a list and how it works. So indexing is a way to provide a local … Read more

What is the purpose of the return statement? How is it different from printing?

  Return Statement Return Statement leads the function to exit and give back the value to its caller after executing the operations in a particular function, As the function has a property of taking something as input as a parameter and giving back the output after executing the operations as return back to the caller … Read more

How Can I Concatenate Two Lists In Python?

Now Here we are going to discuss more How can I concatenate two lists in Python? There are two ways to do so first can be we can simply add both the list using + (Plus Operator) where we can simply add them as two strings, and we can also use the inbuild function extend … Read more

How Immutable Is Different from Mutable Types, In python Programming

Mutable are those which could be edited after it is defined for example list whose elements can be edited even after defining, whereas in case of immutable we can not edit them for example String. What is Mutable? Mutuable are those data Types that can be edited after Declaration For example once a datatype is … Read more

Sorting in python

Sorting in python

Sorting in python Sorting means arranging a large number of values in a specific order such as ascending and descending, alphabetical, distance, etc. Python provides built-in functions that offer powerful features to do basic sorting or customize ordering at a smooth level. Python has a built-in sort() list method that modifies it in-place and a sorted() … Read more

Linked List Program in Python – Create Linked List, Add Node, Iterrate and Print Data

Lets try to create Linked List in Python as part of out Data structure Tutorial. Problem Statement  Create Linked List Basic Program in Python. Solution Lets understand the Very basic about Linked List – Linked List are dynamic array type data structure where nodes and allocated on the fly i.e. dynamically and address/link or next … Read more

MergeSort: Divide and Conquer Routine for Sorting in Python

In Algorithmic thinking, Divide and Conquer Paradigm is widely applicable to problem solving. As the name says, Divide and Conquer approach works by dividing a large problem recursively into small tractable sub-problems which can be solved with ease and then the solutions are then combined to the actual problem at hand. Enough verbosity, in this … Read more

Diagonal Traversal of Binary Tree – Print Data Diagonally ( Algorithm with Java Code )

Objective :  We are given a binary tree we need to print the data of tree diagonally , it is also know as Diagonal Tree Traversal. Sample Input : Let us consider the below tree 1 3           2 6.   8  5.          4 9    7     Out Put :  We … Read more

%d bloggers like this: