Initial list: [1, 2, 3, 'apple', 'samsung']
Appended list: [1, 2, 3, 'apple', 'samsung', 'huawei']
aList = ['apple', 'samsung', 'huawei', 'oneplus', 'pixel']
print('Initial list:', aList)
aList.insert(1, 'htc')
print('htc inserted after samsung:', aList)
aList.remove('huawei')
print('Huawei gone list:', aList)
del aList[0]
print('Index 0 gone list:', aList)
Initial list: ['apple', 'samsung', 'huawei', 'oneplus', 'pixel']
htc inserted after samsung: ['apple', 'htc', 'samsung', 'huawei', 'oneplus', 'pixel']
Huawei gone list: ['apple', 'htc', 'samsung', 'oneplus', 'pixel']
Index 0 gone list: ['htc', 'samsung', 'oneplus', 'pixel']
Initial list: ['apple', 'samsung', 'huawei']
Samsung replaced with pixel list: ['apple', 'pixel', 'huawei']
aList = [12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1]
even_sum = 0
for score in aList:
if score % 2 == 0:
even_sum += score
min_value = min(aList)
max_value = max(aList)
print("Sum of even numbers in the list:", even_sum)
print("Minimum value in the list:", min_value)
print("Maximum value in the list:", max_value)
Sum of even numbers in the list: 42
Minimum value in the list: 1
Maximum value in the list: 12