Generate Python code that will update the values of a list
A list of integers lst = [5, 10, 10, 15, 25]. Update all values that are larger than 10 by subtracting 5.
lst = [x if x <= 10 else x - 5 for x in lst]