#Import the NumPy library
import numpy as np

# Creating a 3x3 NumPy array
arr = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])

# Swapping rows 0 and 2
arr[[0, 2]] = arr[[2, 0]]

# Displaying the result
print(arr)