Тёмный

set in python | Lec-17 

MANISH KUMAR
Подписаться 21 тыс.
Просмотров 1 тыс.
50% 1

In this video, I have talked about the fundamentals of programming and Python. If you complete this, you will be well-versed in using tuples for different use cases.
Directly connect with me at:- topmate.io/man...
Discord channel:- / discord
For more queries reach out to me on my below social media handle.
Follow me on LinkedIn:- / manish-kumar-373b86176
Follow Me On Instagram:- / competitive_gyan1
Follow me on Facebook:- / manish12340
My Second Channel -- / @competitivegyan1
Interview series Playlist:- • Interview Questions an...
My Gear:-
Rode Mic:-- amzn.to/3RekC7a
Boya M1 Mic-- amzn.to/3uW0nnn
Wireless Mic:-- amzn.to/3TqLRhE
Tripod1 -- amzn.to/4avjyF4
Tripod2:-- amzn.to/46Y3QPu
camera1:-- amzn.to/3GIQlsE
camera2:-- amzn.to/46X190P
Pentab (Medium size):-- amzn.to/3RgMszQ (Recommended)
Pentab (Small size):-- amzn.to/3RpmIS0
Mobile:-- amzn.to/47Y8oa4 ( Aapko ye bilkul nahi lena hai)
Laptop -- amzn.to/3Ns5Okj
Mouse+keyboard combo -- amzn.to/3Ro6GYl
21-inch Monitor-- amzn.to/3TvCE7E
27-inch Monitor-- amzn.to/47QzXlA
iPad Pencil:-- amzn.to/4aiJxiG
iPad 9th Generation:-- amzn.to/470I11X
Boom Arm/Swing Arm:-- amzn.to/48eH2we
My PC Components:-
intel i7 Processor:-- amzn.to/47Svdfe
G.Skill RAM:-- amzn.to/47VFffI
Samsung SSD:-- amzn.to/3uVSE8W
WD Blue HDD:-- amzn.to/47Y91QY
RTX 3060Ti Graphic card:- amzn.to/3tdLDjn
Gigabyte Motherboard:-- amzn.to/3RFUTGl
O11 Dynamic Cabinet:-- amzn.to/4avkgSK
Liquid cooler:-- amzn.to/472S8mS
Antec Prizm FAN:-- amzn.to/48ey4Pj

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@BeingSam7
@BeingSam7 16 дней назад
Manish, humne to padha hai only strings and tuples are immutable. list, set and dictionary are mutable bro..
@manish_kumar_1
@manish_kumar_1 16 дней назад
Hi everyone, Yes @Beingsam is correct here. We can add and remove elements from a set so it is mutable. Since this is unordered so, items of a set are immutable but set is mutable. For example set1 = {1,4,7,3,2,8} I can add the element 12 in the set so it is mutable. But if I want to replace 2 with 12 so it is not possible because as I said earlier elements of a set are immutable. I am really sorry for my mistake 😢
@BeingSam7
@BeingSam7 16 дней назад
We all are humans, and I have said it earlier you are a great human being. It takes a lot of courage to admit of being wrong and pin the very comment saying so. You are the best teacher we could have asked for, be it Pyspark or python. You Rock @Manish_kumar_1
@jigsparikh7961
@jigsparikh7961 4 месяца назад
i always shyed away from python but because of you i started learning it. Thanks a million you are awesome.
@ShubhamKumar-cf9ih
@ShubhamKumar-cf9ih 4 месяца назад
Time and Space both will be O(n). As it has to traverse to each number and for storing the number also it has to add all till the match.
@raghavjuyalcomedyclub184
@raghavjuyalcomedyclub184 3 месяца назад
time complexity is o(n^3) since to ( first loop o(n) x check element in list1 o(n) x check in list2 o(n) )
@user-yd1fu7hl6j
@user-yd1fu7hl6j 4 месяца назад
time complexity - o(n) becoz of only one loop , extra spacis used but in worst case maximum element can be appended then o(n) space complexity
@anantkashyap1746
@anantkashyap1746 4 месяца назад
Time complexity O(n) as it traverse using for loop and space complexity O(N) as it uses space to append the result
@jigsparikh7961
@jigsparikh7961 4 месяца назад
superb video thanks
@satyamkumarjha4185
@satyamkumarjha4185 Месяц назад
sets are mutable.
@safiadawood5637
@safiadawood5637 4 месяца назад
# Q1 list1 = [1,2,3,4,5,6] list2 = [4,5,6,7,8] t1 = set(list1) t2 = set(list2) print(f"Missing values in list1 ={list(t2.difference(t1))}") print(f"Additional values in list2 = {list(t1.difference(t2))}") print(f"Missing values in list1 = {list (t1.difference(t2))}") print(f"Additional values in list2 ={list(t2.difference(t1))}") # Q2 ar1 = [1, 5, 10, 20, 40, 80] ar2 = [6, 7, 20, 80, 100] ar3 = [3, 4, 15, 20, 30, 70, 80, 120] common_items = set(ar1).intersection(set(ar2),set(ar3)) print(list(common_items)) Time complexity will be O(n) to convert to set, and O(n) to do the intersetion. So , final time complexity will be O(n) Space complexity will be O(n) too as each list will be stored as set.
@bolisettisaisatwik2198
@bolisettisaisatwik2198 4 месяца назад
Big fan Manish Kumar :).
@shoaibmalik1217
@shoaibmalik1217 4 месяца назад
First comment
@PranshuHasani
@PranshuHasani 4 месяца назад
@AbhinavShukla-ki5jd
@AbhinavShukla-ki5jd Месяц назад
#Q1 from loguru import logger l1=[1,2,3,4,5,6] s1=set(l1) l2=[4,5,6,7,8] s2=set(l2) logger.info(f"Missing values in list1 ={list(s2-s1)}") logger.info(f"Additional values in list1 ={list(s1-s2)}") logger.info(f"Missing values in list2 ={list(s1-s2)}") logger.info(f"Additional values in list1 ={list(s2-s1)}") #Q2 l1=[1,5,10,20,40,80] l2=[6,7,20,80,100] l3=[3,4,15,20,30,70,80,100] s1=set(l1) s2=set(l2) s3=set(l3) sn=s1.intersection(s2,s3) logger.info(list(sn))
Далее
string in python | Lec-17
34:47
Просмотров 1,2 тыс.
*args and **kwargs in python | Lec-22
33:21
Просмотров 1,3 тыс.
New Dyna Skin is OP🥵🔥 | Brawl Stars
00:16
Просмотров 605 тыс.
.join() method in python | Lec-20
24:04
Просмотров 1,3 тыс.
Understand the subscription Schema
20:11
Просмотров 33 тыс.
function in python | Lec-21
23:03
Просмотров 1 тыс.
Python Asynchronous Programming - AsyncIO & Async/Await
25:57
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
The Secret Science of Perfect Spacing
9:40
Просмотров 408 тыс.
New Dyna Skin is OP🥵🔥 | Brawl Stars
00:16
Просмотров 605 тыс.