Very nice! This is an equivalent if statement in Python:

if any(mount.mountPoint == '/mnt/<directory>' for mount in dbutils.fs.mounts()):