Actual purpose of exec() in Python

By Khushi Aswani

In this tutorial, we will discuss exec() in Python, which is responsible for the dynamic execution of a string or an object. Syntax for exec() exec(object[, globals[, locals]]) obj.... Read More

How to check if a vector contains a particular value in C++

By HARI HARAN B

Finding whether a vector contains a particular value, can be done in linear time if it’s a random vector. If it’s known that the vector is sorted then this can be further o.... Read More

Detect mouse clicks in Python with position using pynput

By Harsh Parmar

In this tutorial, you will learn how to detect mouse clicks in Python. This program will exactly print the location and the button name which is clicked. We have to install pynput .... Read More

Find sum of elements in an array with composite frequency in Java

By Swastik Panja

Here, we will learn how to find the sum of numbers in an array with composite frequency in Java. What is Composite Frequency? Composite numbers are those numbers that have factors .... Read More

plusMillis() Method in Java with Examples

By Swastik Panja

In this tutorial, we will learn the plusMillis() method in Java with examples. The plusMillis() method adds the specified number of milliseconds to the time value. This method can .... Read More

Pretty print of a 2D list in Python

By Kovid Bhatt

In this text, we will learn how to get a pretty print of a 2D list in Python. Lists can be one-dimensional, 2-dimensional, and three-dimensional. As a part of this tutorial, we are.... Read More

Remove last n occurrences of substring in a string in C++

By Aakanksha Thakar

This tutorial will see how to remove the last n occurrences of the substring in a string in C++. The string is said to be substring if each character from it is present in the pare.... Read More

Get selected value in dropdown list using JavaScript

By HETVI JAIN

In this article, we will focus on how to get the selected value in the dropdown list in JavaScript.There are two ways to achieve that. Using Value Property Using selectedIndex prop.... Read More