Added lecture 2026113
This commit is contained in:
parent
be356ccb59
commit
5b630435ae
27 changed files with 738 additions and 0 deletions
13
lecture20261103/lists02/lists02-access-elements-simple.py
Normal file
13
lecture20261103/lists02/lists02-access-elements-simple.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Create a simple list
|
||||
list1 = ["Mary","Harry","Larry","Moe","Alice", "Katrina"]
|
||||
|
||||
print("The length of list 1 is ",len(list1))
|
||||
|
||||
print( list1[1:4])
|
||||
|
||||
print( "list1[0] =", list1[0])
|
||||
print( "list1[1] =", list1[1])
|
||||
print( "list1[2] =", list1[2])
|
||||
print( "list1[3] =", list1[3])
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue