List Comprehensions | Hackerrank | Python | Easy Level

preview_player
Показать описание
This is a problem based on a short and handy concept of python lists. You can start with this problem to practice this list comprehension concept of python.
Link for the question :

Please tell me in the comment section if you want me to solve any the the coding problems. Also share the link to the problem.
Рекомендации по теме
Комментарии
Автор

you literally did it so easy. thanks so much.

msa
Автор

Thankyou😊😊 u made it soo easy to understand 🙏😁

shivamtiwari
Автор

To whoever is watching this video in 2024, there is a minor issue with the code in the video, instead of writing (i, j, k) != 0, write (i+j+k) != 0

Example:

x = int(input())
y = int(input())
z = int(input())
n = int(input())

p = [[i, j, k] for i in range (0, x+1) for j in range (0, y+1) for k in range(0, z+1) if (i+j+k) != n ]
print(p)

deekshaaah
Автор

wait why am i getting the error: i, j, k not defined?

shakti
Автор

u have to explain it better, like why (0, x +1) why are u adding the +1 ?

JashSingh-bvge
Автор

was it easy level? F*ck, it's hard as f

daniarcus