<reponame>Cleancode404/ABSP<filename>Chapter4/list.py
a = [1, 2, 3, 4, 5, 6]

print(len(a))
print(a[:4])
print(a[3])
print(a[-3])  #negative index (count backward from the right side)



# animals list
animals = ['cat', 'turtle', 'dog', 'guinea pig', 'duck']

# 'dog' is removed
animals.remove('dog')

# Updated animals list
print('Updated animals list: ', animals)
a = [1, 2, 3, 4, 5, 6]

print(len(a))
print(a[:4])
print(a[3])
print(a[-3])  #negative index (count backward from the right side)



# animals list
animals = ['cat', 'turtle', 'dog', 'guinea pig', 'duck']

# 'dog' is removed
animals.remove('dog')

# Updated animals list
print('Updated animals list: ', animals)
#negative index (count backward from the right side) # animals list # 'dog' is removed # Updated animals list