Write a Python Program to Create a List of Tuples with the First Element as the Number and Second Element as the Square of the Number using list comprehension


Topic: Write a Python Program to Create a List of Tuples with the First Element as the Number and Second Element as the Square of the Number using list comprehension

Solution

l_range=2
u_range=5
a=[(x,x**2) for x in range(l_range,u_range+1)]



List all Python Programs