Q. finding the Two sum from list which is equal to the target value ?

LIST

a list is created by placing elements inside square brackets [], separated by commas. a list can have any number of items and they may be of different types (integer, float, string, etc.) a list can also have another list as an item. This is called a nested list.

FOR LOOP

A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string). This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages. With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.


OUTPUT


Related Post


How to insert a element in linked list python?

A linked list is a sequence of data elements, which are connected together via links. Each data element contains a connection to another data element.....


Python program to print differrent pattern triangle(staircase problem).

For loop is a versatile tool in python it can be used print Differrent pattern in python.
Down below two differrent codes ....

Finding the middle element from a linked list Python?

A linked list is a sequence of data elements, which are connected together via links. Each data element contains a connection to another........

Q.how to Reverse a linked list python ?

To Reverse a linked a list , we iterate over each element and store it in a list and then iterate over th...