user
Suggest improvements for the following code segment to make it more Pythonic.

array = [1, 2, 3, 4]
for x in range(len(array)):
  array[x] += 5


assistant
The following code segment can be made more Pythonic by utilizing list comprehension. Instead of using a for loop, replace it with a list comprehension:

array = [1, 2, 3, 4]
array = [x + 5 for x in array]