I am struggling to figure out how to mix nested list comprehension with a replacing Here is an example of the nested for loops that I am trying to convert
arr