Take a look at the Layer documentation for ArcGIS Pro or ArcMap (since there are differences) to see if one (or two in combination) of the following layer properties are what you're looking for. Also consider splitting the full path and taking only the final portion if you don't find what you're looking for.
ArcGIS Pro Properties:
dataSource: Returns the complete path for the layer's data source. It includes the full workspace path and name of the dataset. For enterprise geodatabase layers, a string containing the layer's connection information is returned.
longName: A layer's full name including group layer and composite layer structure.
name: The name of a layer the way it would appear in the table of contents. Spaces can be included. It is important that all layers in a map have a unique name so they can be easily referenced by their names.
ArcMap Properties:
datasetName: Returns the name of the layer's dataset the way it appears in the workspace, not in the TOC. Not all layers support the datasetName property (for example, web services), so it is good practice to test for this ahead of time using the supports method.
dataSource: Returns the complete path for the layer's data source. It includes the workspacePath and the datasetName properties combined. Not all layers support the dataSource property (for example, annotation classes and web services), so it is good practice to test for this ahead of time using the supports method.
longName: This property is valuable when trying to determine whether a layer belongs to a group layer. If a layer does not belong to a group layer, the long name will equal the layer name. If a layer does belong to a group layer, the group layer structure will be included in the long name. For example, the name of a layer nested inside a group layer within another group layer may look something like Group1\Group2\LayerName. All layer types support this property.
name: Provides the ability to set or get the name of a layer the way it would appear in the ArcMap table of contents. Spaces can be included. All layer types support this property.
workspacePath: Returns a path to the layer's workspace or connection file. Not all layers support the workspacePath property (for example, web services), so it is good practice to test for this ahead of time using the supports method.
print (n.datasetName)