PYTHON PROGRAMMING TO INTERCHANGE 1ST & LAST ELEMENTS IN A LIST

PYTHON PROGRAMMING TO INTERCHANGE 1ST & LAST ELEMENTS IN A LIST

Personal Tutor

3 года назад

1,488 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

vishant sharma
vishant sharma - 19.05.2023 21:43

isse bura aaj tuk kisi teacher ne nahi pdhaya, by the way that temp was a temprary variable ,which was used to store the value of newlist[0], which makes newlist[0] empty, now put newlist[size-1] value and put it in newlist[0], then in that last line newlist[size-1]gets the value of temp, and hence the elements gets interchange.

Ответить
KAINAAT MAKHANI
KAINAAT MAKHANI - 23.03.2023 10:31

good job

Ответить
SarsH
SarsH - 09.03.2023 15:01

Thank you Ma'am for making the explanation of this video, helped a lot 🤍

Ответить