Computer Science, asked by cristina2, 5 months ago

Given a list: Names = ['Amir', 'Bear', 'Charlton', 'Daman']. Write python statements to extract and print the letters

l
B

Answers

Answered by kartikeya1661
2

Answer:

names1 = ['Amir', 'Bear', 'Charlton', 'Daman']

names2 = names1

names3 = names1[:]

 

names2[0] = 'Alice'

names3[1] = 'Bob'

 

sum = 0

for ls in (names1, names2, names3):

if ls[0] == 'Alice':

sum += 1

if ls[1] == 'Bob':

sum += 10

 

print sum

Similar questions