0
what is the condition in while in line 19(ANSWERED)
https://code.sololearn.com/cloC3anvro20/#py here a program which i found online in this can some one tell me what while loops condition and why it was used THe program is replacing current last node of the linked list to the new data node. So the current last node of the linked list becomes the second last data node and the new node becomes the last node of the linked list.
5 Réponses
+ 3
Bijin Sanny, the parentheses make no difference in python, you could just as well erase them.
It's as Ipang said:
laste is replaced by the next value, until the next value is None, then the loop stops.
+ 3
HonFu
Need a bit of help here ... 🙏
+ 2
Looks like it defines the loop to continue running while the appointed Node object has a next value link. Not too good with Python and DS, so I could be wrong.
+ 2
Thanks HonFu for u r answes I understood it now✌️
+ 1
Ipang Thanks man but what I was trying to ask was the condition inside the parenthesis... I too just started to learn about classes and it's uses so it's rough sometimes