Python program to remove an element from a list using 'del' statement

All items are placed inside a square bracket in a python list. The index of the items starts from 0, i.e. the index of the first element is 0, the index of the second element is 1 etc. We can access any item in a list using its index. Also, the python list is mutable. We can remove or change any item of a list using its index. In this post, I will show you how to remove single or multiple elements from a python list.

Read

List all the files in a Zip file using Python 3

In this tutorial, we will learn how to find out all the files of a zip file. For that, we will use 'zipfile' library which is already available in the 'python' package. We will have to use 'import zipfile'. Using this module, we can create, read, write,append and list all the files from a Zip file.

Read

C program to swap two numbers using call by reference

In this example, we will learn how to swap two numbers using call by reference or by using pointers. Let's take a look into the program :.

Read

Python program to exchange two numbers without using a third number

In this example, we will learn how to exchange two numbers without using any extra variable. We all know to exchange two numbers using a temporary variable. Exchanging two numbers using a third temporary variable is easy. The working process is the same in all programming languages.

Read

Java program to read and print a two dimensional array

In this tutorial, we will learn how to read elements of a two-dimensional array and print out the result. We will first read the row and column number from the user and then we will read all elements one by one using a loop.

Read

Java 8 example to convert a string to integer stream (IntStream)

In this tutorial, we will learn how to convert a string to IntStream. We will use chars() method to convert a string to IntStream. To print out the result of the IntStream, we will use Stream.forEach method. Then we will pass one lambda expression to print out the characters.

Read

How to override toString method to print contents of a object in Java

To print the contents of an object, we need to override toString() method of that object. In this tutorial we will learn how to override toString() method of an object and what are the benifits of doing it.

Read

Implement a Queue Data Structure in Java using Linked List

The Queue is an interface in Java which extends Collection interface. In this tutorial, we will learn how to use Queue to implement a Queue data structure in Java. Queue is a FIFO or First in first out data structure. That means it will always insert an element to the end of the list and remove an element from the beginning of the list.

Read

Java program to print random uppercase letter in a string

In this tutorial, we will learn how to print random uppercase letter from a String in Java. To achieve that, we will first create one random number . The size of the random number is maximum length of the string. After that, we will pick the character for that position from the String and finally, we will print the uppercase version of the character. The java program is as below :.

Read

How to update application badge count locally in iOS swift

In this tutorial, we will learn how to update the badge count of an iOS application using Swift. Badge count is the count number that is displayed with your application icon on home page.

Read