Keyword can't be an expression

cost=0
counts=0
print(cost,counts,“Before prog”)
for range in[25,10,12,14,18,20]:
counts=counts+1
cost=cost+range
print(“costs”=cost,“counts1”=counts,“og value”=range)
print(“array implemented”)

in above code in line print(“costs”=cost,“counts1”=counts,“og value”=range) i got error mentioned in title

Hi, Mohit.

Your code is almost correct kindly refer to the string formatting course once more.
You were storing the integer value in the string and string formatting syntax was also not correct.
Kindly refer to the corrected code.

cost=0
counts=0
print(“Before prog %d %d” %(cost, counts))

for range in [25,10,12,14,18,20]:
counts=counts+1
cost=cost+range

print(“cost is %d, counts is %d value is %d” %(cost,counts,range))

All the best!