I have taken up many paid and unpaid python courses from a number of popular programs out there but never got this much clarity and understanding on list comprehension. Your method of teaching with so many real time scenarios is truly exceptional. The content is pure gold. Underrated channel. Thank you so much Sumit Sir! looking forward to the upcoming session
@sumitmittal0710 ай бұрын
Great to hear!
@vishal-ox3zd9 ай бұрын
Hi Sumit Sir , I just love the way you are teaching. I have seen many youtube videos on python but this python course is unique.the content of this course helps me a lot to understand many concepts of python. Please share some more concepts of python which will help data engineers like us. Really you are a great teacher 🙏 Thanks a lot.
@vandanapatil818210 ай бұрын
Sir we want same type of in depth lectures/playlist on Excel & power BI for Data Analyst with real industry relevant projects 😊
@arunsundar373910 ай бұрын
it was fun to know & see the benefits of List comprehension & various other concepts of Python, had little hesitancy to learn one another programming language, now i can embrace Python after seeing it is easy to learn from this Python series & also more importantly apply it in Pyspark code :)
@vandanapatil818210 ай бұрын
Best teacher in india 😊🎉
@sumitmittal0710 ай бұрын
thank you for tour kind words
@sribalaji71319 ай бұрын
for the world💌
@faizanmidda133710 ай бұрын
Sir. Also please teach OS module and how to handle excel files. I love the way you teach.
@gauravrai43987 ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥 on fire content .... many thanks Sumit Sir .... i am a bit late but catching up on all the videos in this playlist
@venkateshkannan739810 ай бұрын
Best video on lists and tuples!
@sumitmittal0710 ай бұрын
Yay! Thank you!
@abhishekn78610 ай бұрын
Top notch content sir, really loved it. please upload videos as fast as you can. Thanks
@sumitmittal0710 ай бұрын
glad that you enjoyed the session
@swapnam15288 ай бұрын
Videos are really helpful. I have not seen such videos with real time examples. i am truly enjoying the sessions. Sir is it possible to create video for oops concepte.
@Soham_Posts2 ай бұрын
how can i learn to implement logic like you sir BTW your videos are too good 😃
@venkateshkannan739810 ай бұрын
Solution to Assignment3(my tiny contribution). Im using defaultdict(), a subclass of Dictionary. I find it handy when working with lists. from collections import defaultdict company_average = defaultdict(list) for sublist in company: company_average[sublist[2]].append(sublist[3]) average_salaries = {department: sum(salaries) / len(salaries) for department, salaries in company_average.items()} print(average_salaries)
@sumitmittal0710 ай бұрын
that's great
@mehulthakur54494 ай бұрын
dep_avg_sal = [] emp_department = [ emp[2] for emp in employees ] emp_set = set(emp_department) for emp_dep in emp_set: count = 0 total_sum = 0 for dep_sal in employees: if dep_sal[2] == emp_dep: total_sum += dep_sal[3] count += 1 sal_avg = total_sum / count dep_avg_sal.append((emp_dep, sal_avg)) print(dep_avg_sal)
@ArpitSrivastava199410 ай бұрын
Very clear and super helpful examples taken
@sumitmittal0710 ай бұрын
Glad it was helpful!
@attaullahansari59227 күн бұрын
Thank you sir!
@sidhantdorge244510 ай бұрын
Hey guys, Sharing my approach which I used to solve the Assignments that Sumit Sir mentioned in the session Assignment-1: status_list = ['CLOSED', 'PENDING_PAYMENT', 'COMPLETE', 'CLOSED', 'COMPLETE', 'COMPLETE', 'COMPLETE', 'PROCESSING', 'PENDING_PAYMENT', 'PENDING_PAYMENT'] status_list_set = set(status_list) print(status_list_set) order_status_count = [(status,status_list.count(status)) for status in status_list_set] print(order_status_count) Assignment-2: order_list = [ [1, 100, 'success'], [2, 200, 'pending'], [3, 150, 'success'], [4, 300, 'failed'], [5, 400, 'success'], [6, 250, 'pending'], [7, 350, 'failed'], [8, 450, 'success'], [9, 500, 'pending'], [10, 600, 'failed'] ] order_list_status = [orders[2] for orders in order_list] order_list_status_set = set(order_list_status) status_count = [(status, order_list_status.count(status)) for status in order_list_status_set] for status in status_count: print(f"{status[0]} : {status[1]}") Assignment-3: employee_salary = [ [101, 'John', 'IT', 60000], [102, 'Alice', 'HR', 50000], [103, 'Bob', 'Finance', 70000], [104, 'Emma', 'IT', 55000], [105, 'David', 'Finance', 75000], [106, 'Sophia', 'HR', 48000] ] finance_sal=[] it_sal = [] hr_sal = [] for item in employee_salary: if item[2] == "IT": it_sal.append(item[3]) elif item[2] == "HR": hr_sal.append(item[3]) else: finance_sal.append(item[3]) finance_avg_sal = sum(finance_sal)/len(finance_sal) hr_avg_sal = sum(hr_sal)/len(hr_sal) it_avg_sal = sum(it_sal)/len(it_sal) print(f"Finance: Average Salary - {finance_avg_sal}") print(f"IT: Average Salary - {it_avg_sal}") print(f"HR: Average Salary - {hr_avg_sal}") Please feel free to add any suggestions you have or any doubts that you need to clarify, I am happy to help.
@DileepNelliakkattu8 ай бұрын
One problem with this solution is that this code needs to change when the input has more departments, so this is not a generic solution
@SoumyaBiswas372 ай бұрын
Sir, if I want to take a value during run time and want to add it within the nested list, Can it be possible with list comprehension??
@prashantchourasiya12029 ай бұрын
Wonderful as expected...
@ManishSharma-wy2py10 ай бұрын
It was great learning ❤
@vikaschavan611810 ай бұрын
Incredible, i enjoyed thoroughly. Just one question sir when we are doing word count, do you really feel we need to remove duplicate first? For example a paragraph may certain words which were repeated. If we remove duplicates then it will not give the result which we are looking for. Please share your thoughts on this
Hello Sumit Sir, Just finished watching all the 4 video in your Python playlist, which are super insightful, just wanted to thank you for starting this course (for free) which will be beneficial for every student/employee. I have just finished the assignments that you mentioned at the end of this session, it was quite fun to solve did find the average salary one a bit tough but did not look for solution on GPT and gave it a shot and I am glad that I was able to solve it.🙂
@sumitmittal0710 ай бұрын
I am really happy to hear this
@sidhantdorge244510 ай бұрын
Thank you @@sumitmittal07 Sir. For the assignment solutions I just wanted some of your thoughts and the community so should I share it here?.
@shivamgupta81069 ай бұрын
Hi Sumit Sir we are saying tuple is immutable but tuple inside list is mutable is that correct. for Ex i/p[(100,5),(200,10)] o/p[(100,5,105),(200,10,220)]
@azharaktherk243210 ай бұрын
For that 3rd assignment it will be very helpful if you can share the solution sir.
@arpithaks346710 ай бұрын
please share running notes
@swapnam15288 ай бұрын
nested_lists=[[i,i**2,i**3] for i in range(1,4)] print(nested_lists)
@sekharG-o7m10 ай бұрын
could you pls make a video on cicd pipeline, agile methodology
@ameerullah22609 ай бұрын
Hello sir, where are you putting notes for viewers? @Sumit Mittal
@ameerullah22609 ай бұрын
Hello sir, where are you putting notes for viewers?
@richaandparas42859 ай бұрын
Assignment 3 solution using list comprehension - dept_lst = [emp[2] for emp in emp_lst] dept_set = set(dept_lst) avg_lst = [[dept, sum([emp[3] for emp in emp_lst if emp[2] == dept])/len([x[2] for x in emp_lst if x[2] == dept])] for dept in dept_set]
@DileepNelliakkattu8 ай бұрын
This is working perfectly, Thank you
@sohamchintawar40158 ай бұрын
Hi Can you please share reference theory material and python files? You mentioned in few videos that its available but I couldn't find it
@DileepNelliakkattu8 ай бұрын
Below is the solution for 3rd question, Please suggest your improvements as this looks very complex to me dept_list=[i[2] for i in data] dept_set=set(dept_list) dept_count=[(i,dept_list.count(i)) for i in dept_set] print(dept_count) dept_sum=[ (j[2],j[3]) for i in dept_set for j in data if j[2]==i] print(dept_sum) for i in dept_count: count = 0 sum = 0 for j in dept_sum: if i[0]==j[0]: count += 1 sum+=j[1] if i[1]==count: avg=sum/count print(f'{i[0]}:Averege salary {avg}')
@sreenivasulareddy-s1w10 ай бұрын
Hi Sumit sir Are you going to cover data libraries like PANDAS and NUMPY as part of these sessions later ?
@sumitmittal0710 ай бұрын
yes I will cover
@sreenivasulareddy-s1w10 ай бұрын
Thank You Sir
@skjahangir380010 ай бұрын
@@sumitmittal07 sir when will be the next video on Python
@dhanushkumar784910 ай бұрын
Assignment 2 solution : d=defaultdict(int) for i in trans: status=i[2] d[status]+=1 for a,b in d.items(): print(a,b) Assignment 3 solution : department_salary_sum = defaultdict(int) department_employee_count = defaultdict(int) for _,_,dept,salary in list1: department_salary_sum[dept] += salary department_employee_count[dept] += 1 avg={dept:department_salary_sum[dept]/department_employee_count[dept] for dept in department_salary_sum } for dept, avg_salary in avg.items(): print(f"{dept}: {avg_salary:.2f}")
@siddhantmishra65815 ай бұрын
Assignment 3: seta = set() for sublist in employee: seta.add(sublist[2]) lista = list(seta) print(lista) IT =[] HR =[] Finance =[] for sublist in employee: if sublist[2] == lista[0]: IT.append(sublist[3]) elif sublist[2] == lista[1]: HR.append(sublist[3]) else: Finance.append(sublist[3]) print("IT :%.2f"%(sum(IT)/len(IT))) print("HR :%.2f"%(sum(HR)/len(HR))) print("Finance :%.2f"%(sum(Finance)/len(Finance)))
@shantanuchaudhary117610 ай бұрын
Sir please help with assignment 3
@vishaldeshatwad869010 ай бұрын
Sir How many videos in total does it take to complete the python playlist
@sumitmittal0710 ай бұрын
total 10 in this playlist
@sakshijain353410 ай бұрын
someone please share solution of assignment 3 using list comprehension
@pramilasekar19759 ай бұрын
Assignement 1: for word in line_set: result_set.append((word,lines.count(word))) print(result_set) for the above code im getting the below code, [('COMPLETE', 4)] [('COMPLETE', 4), ('PENDING_PAYMENT', 3)] [('COMPLETE', 4), ('PENDING_PAYMENT', 3), ('CLOSED', 2)] [('COMPLETE', 4), ('PENDING_PAYMENT', 3), ('CLOSED', 2), ('PROCESSING', 1)] Please let me know how to get the last row alone?
@madhusudank96849 ай бұрын
print(result_set) is under for loop. Its an indenting issue. Below updated code will give you the desired result. for word in line_set: result_set.append((word,lines.count(word))) print(result_set)
@asktostranger829610 ай бұрын
Anyone got notes ???
@gunjansharma310310 ай бұрын
😃😃
@asktostranger829610 ай бұрын
Anyone got notes please share 🙏
@jaykumargupta364710 ай бұрын
Devin ko sab aata h
@kaladharnaidusompalyam85110 ай бұрын
👏👏🫰
@sakshijain353410 ай бұрын
dep_list=[(1,'JOHN','IT',2000),(2,'sam','IT',2000),(3,'RAM','HR',3000)] dep_list_new= [(line[2],line[3]) for line in dep_list] //[('IT', 2000), ('IT', 2000), ('HR', 3000)] dept_salaries = {} //empty_dict [dept_salaries.setdefault(dept, []).append(salary) for dept, salary in dep_list_new]//{'IT': [2000, 2000], 'HR': [3000]} average_salaries = {dept: sum(salaries) / len(salaries) for dept, salaries in dept_salaries.items()} print(average_salaries)