You can also do
import unreal
editor_asset = unreal.EditorAssetLibrary()
# Search for an asset using a Path String such as
# '/Game/ProjectName/Maps/Sandbox/Sandbox_P.umap'
# Game is the "Content" folder in Python
# This will return an AssetData class that contains a lot of usefull methods
# Check here: https://docs.unrealengine.com/4.26/en-US/PythonAPI/class/AssetData.html?highlight=assetdata#unreal.AssetData
search_for_asset = editor_asset.find_asset_data('pathstring')
# Now you can call the get_asset() method and receive the object that you can poss on to other functions
asset_get = search_for_asset.get_asset()
# You can for instance rename the file now
editor_util = unreal.EditorUtilityLibrary()
editor_util.rename_asset(asset_get, 'newnamegoeshere')