list comprehension
Вставка
- Опубліковано 12 жов 2024
- To access the translated content:
1. The translated content of this course is available in regional languages. For details please visit nptel.ac.in/tr...
The video course content can be accessed in the form of regional language text transcripts, books which can be accessed under downloads of each course, subtitles in the video and Video Text Track below the video.
Your feedback is highly appreciated. Kindly fill this form forms.gle/XFZh...
2. Regional language subtitles available for this course
To watch the subtitles in regional languages:
1. Click on the lecture under Course Details.
2. Play the video.
3. Now click on the Settings icon and a list of features will display
4. From that select the option Subtitles/CC.
5. Now select the Language from the available languages to read the subtitle in the regional language.
Jp here again [comment number 26]
Thank you, Sir, :)
Range for pythagorean triplets must be from 1 since side of triangle cant be zero
At 8:32 there is a mistake. It should be for x in range(100)
Okok bro itna to chalta hai
bhot tez ho rhe ho... hehehehe
nice concentration buddy!!!
also you can try for 3x3 matrix
a=[0]*3
b=[]
for i in range(0,3):
b.append(a)
print(b)
u mad bro? this will create duplicate lists and all the list will point to a so not a good way to initialize this way
Or you can also do
a=[0]*3
b=[a]*3
print(b)
But I think the one shown in the video is better because it does the same thing in one line
#the statement is not working
l = [square(x) for i in range(100) if iseven(x)]
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
NameError: name 'x' is not defined
i defined square and iseven functions
I got it , the statement should be
l = [square(x) for x in range(100) if iseven(x)]
I feel things could have been explained with more depth in this video.
Watch some other video
Python is really good dude I mean it provides methods like maps, comprehensions !!! wow
Ya even I was impressed with list comprehension!
@@lakshman587 me2
@@karthikreddygaddam3104 Tommorow is the online exam for me😁😁
Are you also attending?
@@lakshman587 yes😁
How was the question for programming ??
Thanks