@@sudarshaniyengar1814 I really never expected you would reply this because it was 7 month old comment....I am really happy you did .It's a gift to have you as our professor...
def list_appendbefore(l,z): newlist = [] newlist = newlist + z + l return newlist Isn't this exactly what would do @07:51. Is there a reason why we need to use a for loop? Just curious to hear your thoughts
10:02 'sum' is also an inbuilt function which we overwrote with a variable :P
Didn’t get you.
@@sudarshaniyengar8549 in the function computing average ,you used sum as a variable....I think it's an inbuilt function
My bad 😇. Python is smarter than the programmer. It did break the ambiguity.
@@sudarshaniyengar1814 I really never expected you would reply this because it was 7 month old comment....I am really happy you did .It's a gift to have you as our professor...
@@sudarshaniyengar8549 Sir! why can't we just directly "newl.append(l)" then list 'z' ?
def list_appendbefore(l,z):
newlist = []
newlist = newlist + z + l
return newlist
Isn't this exactly what would do @07:51. Is there a reason why we need to use a for loop?
Just curious to hear your thoughts
yes it works
थैंक्यू
Sir is telling us remember how to calculate avg after we have complete stats 2 😆
Accha hame toh pata hi nhi tha
instead of using index, can we directly use( for i in l:) ??
yes surely, you would just need to write newlist.append(i) insted of l[i]
We can use + instead of append right?
Yes. There also exists an append method.
grt nd