PYTHON LISTS

CLASS 9 & 10 · COMPUTER SCIENCE

Python Lists fruits = ["apple","mango","banana"] fruits[0] → "apple" fruits[-1] → last fruits.append("grapes") len → 4 "apple"0-4"mango"1-3"banana"2-2"grapes"3-1index
STEP 1
prostudypk.com · free MCQ tests
REMEMBER
list[0] is the first
Free test → prostudypk.com
CLASS 9 & 10 · COMPUTER SCIENCE

Why is the first item in a list number 0?

Python lists in 25 seconds

Watch ↓
‹ Labs Next ›