Тёмный
No video :(

#8 : List Comprehensions | Hackerrank Python Solutions 

DEV19
Подписаться 29 тыс.
Просмотров 95 тыс.
50% 1

Thanks if u r Watching us....
#Python #Dev19 #HackerankSOlutions #C #C++ #Java #Python
Please Subscribe Us ....

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

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@equites4748
@equites4748 2 года назад
print([[i, j, k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n])
@ltambito
@ltambito 2 года назад
list=[[a,b,c] for a in range(x+1) for b in range(y+1) for c in range(z+1) if a+b+c != n] print(list)
@Cloudxxx23
@Cloudxxx23 9 месяцев назад
Hi. Why we need to add +1?
@MohammedOmamaS
@MohammedOmamaS 9 месяцев назад
​@@Cloudxxx23 because if x = 2, we can take 0,1,2. And range always takes 1 less value, so if we don't put +1 and take range (2), it will give only 0 and 1.
@byshreyas
@byshreyas 4 года назад
Bro, they have clearly mentioned to not solve using this method. You haven't spoken about List Comprehensions at all. Just add a rick roll somewhere to this video.
@raman7421
@raman7421 2 года назад
Hahahahahaha here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-iik25wqIuFo.html
@premspal2496
@premspal2496 3 года назад
although this is not list comprehensions way to solve problem but you made concept clear thanks!
@akashshinde3678
@akashshinde3678 2 года назад
1) using if loop only:(1 condition only) [ expression ---> loop ---> condition ] (for) (if)
@a33-rushikeshlokhande70
@a33-rushikeshlokhande70 3 года назад
Bhai at least second solution to mil Gaya ,Ty
@parthdalsaniya8773
@parthdalsaniya8773 3 года назад
good work buddy i know you did not use list comprehensions although I learn from your videos keep going
@shibourne2000
@shibourne2000 3 года назад
Dude they have told to not use this method. The point of this whole problem was to learn about list comphrehensions 🤦‍♀
@Studywithmepr
@Studywithmepr 3 года назад
what about list comprehension here???????
@zakjay6748
@zakjay6748 3 года назад
does anyone understand this list comprehension ? >>>> return 1 in [c in word for c in charlist] . I am not getting it.
@abhijain1022
@abhijain1022 4 года назад
we had to use list comprehension instead of loop
@dev.19.community
@dev.19.community 4 года назад
ha bro , bt we can do in many ways..
@nikkivision_
@nikkivision_ 4 года назад
how to code with a list comprehension?
@raman7421
@raman7421 2 года назад
@DEV19 List comprehension makes it more simpler
@navalsehgal1015
@navalsehgal1015 Месяц назад
Great!
@pitoonshindi2715
@pitoonshindi2715 2 года назад
hello, buddy you didn't use list comprehensions man!😂👌👌 nice and simple
@spandanareddy5472
@spandanareddy5472 2 года назад
Thank you sir
@aadil8409
@aadil8409 2 года назад
Are list compression lagana tha lala, pr tere logic sahi tha
@andresfelipe712
@andresfelipe712 Год назад
thanks bro, you are my hero
@dreamphoenix
@dreamphoenix Год назад
Thank you.
@saimanojvarmakalidindi7982
@saimanojvarmakalidindi7982 2 года назад
They mentioned in the question to try not to use for loop !!
@shyamkidiwani4656
@shyamkidiwani4656 11 месяцев назад
Without using function how can you use return bro
@tonyy.9855
@tonyy.9855 Год назад
Thank you!
@spyler1565
@spyler1565 4 года назад
Thanks for the solution
@arnabdas5678
@arnabdas5678 3 года назад
U R ! A Pythoneer
@cyrilverwimp3621
@cyrilverwimp3621 2 года назад
full_liste = [[a,b,c] for a in range(x+1) for b in range(y+1) for c in range(z+1)] new_full_liste = [] for liste_name in full_liste : if reduce(lambda a,b: a + b , liste_name ) != n : new_full_liste.append(liste_name) print(new_full_liste) #do not forget to import reduce from functools
@ltambito
@ltambito 2 года назад
this is list comprehensions?
@cyrilverwimp3621
@cyrilverwimp3621 2 года назад
@@ltambito Yeah try it !
@amruthasankar3453
@amruthasankar3453 2 года назад
Thankyou sir❤️❤️❤️❤️
@feagy
@feagy 2 года назад
x=int(input('enter the value of x')) y=int(input('enter the value of y')) z=int(input('enter the value of z')) n=int(input('enter the value of n')) list=[[a,b,c] for a in range(x+1) for b in range(y+1) for c in range(z+1) ] list1=[[a,b,c] if a+b+c==n else [] for a in range(x+1) for b in range(y+1) for c in range(z+1)] i=0 while i
@aaliyanmalik8409
@aaliyanmalik8409 2 года назад
Hi everyone please try this one, this solution is using list comprehension and this will work for you 100%: l = [[i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if (i+j+k) != n] print(l)
@ashokthegamer3439
@ashokthegamer3439 3 года назад
how we can use this problem in real life situations
@dodv6
@dodv6 2 года назад
good question u are a good question
@nikhilsahijwani3228
@nikhilsahijwani3228 3 года назад
list comprehension likha hai for loop use kar raha hai
@Ayasir-lo3ir
@Ayasir-lo3ir 3 года назад
what os is this thanks!
@sowadhossain2476
@sowadhossain2476 3 года назад
for god sake improve your English or talk in Hindi
@shivamdwivedi8048
@shivamdwivedi8048 4 года назад
time kharaab krdiya bhai tu..
@dev.19.community
@dev.19.community 4 года назад
sorry bhai
Далее
МЕГА МЕЛКОВЫЙ СЕКРЕТ
00:46
Просмотров 291 тыс.
OBLADAET - BARMAN
03:06
Просмотров 59 тыс.
What is Python? Why Python is So Popular?
4:07
Просмотров 1,9 млн
10 Python Comprehensions You SHOULD Be Using
21:35
Просмотров 140 тыс.
#6 : Write a function | Hackerrank Python Solutions
4:39
HackerRank Python Problem No5 || List Comprehension
9:15
Automate your job with Python
6:07
Просмотров 396 тыс.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07