I need to be able to multiply every second number in a list by 2 so say:
List = [1,2,3,4]
I want this to return [1,4,3,8]
but all the ways that I have tried it such as
credit_card = [int(x) for x in input().split()]
credit_card[::2] = [x*2 for x in credit_card[::2]]
print(credit_card)
If i input the same list from before it returns [2,2,6,4]
Is there a way to accomplish what I'm trying to accomplish?