#You have given a Python list. Write a program to find value 20 in the list, and if it is present, replace it with 200.
#only update the first occurrence
given_list = [5, 10, 15, 20, 25, 50, 20]
index20 = given_list.index(20)
given_list[3] = 200
print(given_list)
[5, 10, 15, 200, 25, 50, 20]
# Given a Python list, write a program to remove all occurrences of item 20.
list2 = [5, 20, 15, 20, 25, 50, 20]
remove_value = 20
list2 = [i for i in list2 if i != remove_value]
print(list2)
[5, 15, 25, 50]
#Given a two Python list. Write a program to iterate both lists simultaneously
# and display items from list1 in original order and items from list2 in reverse order.
listA = [10, 20, 30, 40]
listB = [100, 200, 300, 400]
for x, y in zip(listA, listB[::-1]):
print(x, y)
10 400 20 300 30 200 40 100