# What is the result of this code?

nums = [5, 4, 3, 2, 1]
print(nums[1])

# How many items are in this list?

[2,]

#Fill in the blanks to create a list and print its 3rd element.
#
# list =42, 55, 67]
# print(list[])


# Which line of code will cause an error?

num = [5, 4, 3, [2], 1]
print(num[0])
print(num[3][0])
print(num[5])

# What is the result of this code?

nums = [1, 2, 3, 4, 5]
nums[3] = nums[1]
print(nums[3])

# Fill in the blanks to  create a list, reassign its 2nd element and print the whole list.

nums = [33, 42, 56]
nums[1]=22
print(nums)

# What is the result of this code?

nums = [10, 9, 8, 7, 6, 5]
nums[0] = nums[1] - 5
if 4 in nums:
  print(nums[3])
else:
  print(nums[4])

# Fill in the blanks to print "Yes" if the list contains 'z':

letters = ['a', 'b', 'z']

if "z" in letters:
 print("Yes")

# What is the result of this code?

words = ["hello"]
words.append("world")
print(words[1])

# What is the result of this code?

letters = ["a", "b", "c"]
letters.append("d")
print(len(letters))

# What is the result of this code?

nums = [9, 8, 7, 6, 5]
nums.append(4)
nums.insert(2, 11)
print(len(nums))
