Python Interview Question | Create a list of tuples from given list having number & its cube

preview_player
Показать описание
Python Certification is the most sought-after skill in programming domain. In this Python Interview Video Series, we will introduce you to the top 50 asked questions in Python interviews for the year 2021. We have 50+ questions on Python Programming basics which will help you with different expertise levels to reap the maximum benefit from our video series.

Let us start by taking a look at first questions which is frequently asked Python interviews.

Watch this video till the end to understand the coding steps required to create a list of tuples from given list having number and its cube in each tuple in Python.

Like and Subscribe our channel to receive all top 50 Python Interview Questions.
Рекомендации по теме
Комментарии
Автор

List = [ ]
for i in range(3):
n = int(input('Write a number'))
List.append(n)
List_Cube = [ ]
for i in List:
List_Cube.append(i**3)
print(list(zip(List, List_Cube)))

parthagarwal
Автор

Sir ye aap hindi me thoda btao ge toh bcho ke doubts jo hoge vo bta paye ge aisr kisi ko samjh toh a jaye ga pr doubts jo hoge na vo nhi bta paye ga koi

shivampandey