How to replace all the values of a list upto a certain index to ceratin value or item? If the input is:
mylist = ['a', 'b', 'c', 'd']
Lets say the index we chose is 2
and we want to replace with $
. So, the output should look like:
list_op = ['$', '$', '$', 'd']
Can we achive this python standar functions?