File size: 278 Bytes
772e02a
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from pathlib import Path

path = '/kaggle/input/super-resolution-hust/Super Resolution HUST/Set5/image_SRF_4/'

# Parse the path using pathlib
p = Path(path)

# The 'Set5' part is the parent directory of 'image_SRF_4'
set5_part = p.parent.name

print(set5_part)  # Output: Set5