[Solved] Create list from user input and modify some elements


If you dont want to use list comprehension:

my_list=[]
for i in range(5):
    n=int(input("Enter and integer number:"))
    my_list.append(n)
print(my_list)

for index, i in enumerate(my_list):
    if i%5==0:
        my_list[index] = i + 5
print (my_list)

1

solved Create list from user input and modify some elements