Lesson 16 of 34

Lists: ഒരിടത്ത് പല values

9 min 25 XP

40 വിദ്യാർത്ഥികളുടെ marks-ന് 40 variables വേണ്ട! list പല values ക്രമത്തിൽ സൂക്ഷിക്കുന്നു. അവ [ ]-നുള്ളിൽ commas കൊണ്ട് വേർതിരിച്ച് എഴുതൂ.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Index ഉപയോഗിച്ച് ഒരു item മാറ്റാം. Slicing [start:stop] list-ന്റെ ഒരു ഭാഗം നൽകുന്നു (stop ഉൾപ്പെടില്ല).

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

for loop list-ലെ ഓരോ item-ഉം സന്ദർശിക്കുന്നു.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

ഒരു list-ൽ വ്യത്യസ്ത types ഉണ്ടാകാം: [1, "two", 3.0, True]

Challenge

+25 XP

marks = [78, 92, 65, 88]. ആദ്യ mark, അവസാന mark, ആകെ എത്ര marks എന്നിവ ഓരോന്നും സ്വന്തം വരിയിൽ print ചെയ്യൂ.

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.