Python – Slice List example

Posted on Updated on

In our previous article, we came with examples to iterate list and iterate dictionary. Slicing is an important and commonly used feature in Python. By using slice operation at list, we can get sub-list from original list. In this tutorial we will demonstrate different ways to slice list.

1)  Most popular way to slice List

Read the rest of this entry »

Python – Iterate Dictionary example

Posted on

Dictionary is data structure which store data in key-value pair and widely used in Python programming language. In our previous tutorial, we came up with the example to iterate a list. In this blog, we will demonstrate the examples to iterate dictionary in various ways.

1) Iterate dictionary using keys()

Read the rest of this entry »

Python – Iterate List example

Posted on

List is widely used data structure in Python. In this tutorial, we will be demonstrating examples to iterate list using for loop and while loop.

1) Iterate List using for loop

Read the rest of this entry »

Python – Split string example

Posted on Updated on

String is widely used in Python programming language. There are many scenarios where programmers have to split the string based on different delimiters. In this blog, we demonstrate splitting of string using different delimiters.

1) Split string using default delimiter

Read the rest of this entry »