I have a root folder "topfolder". Inside that folder, I have multiple subfolders, "a", "b", "c". I want to rename these subfolders so that they are concatenated with the root folder, such that they become "topfolder_a", "topfolder_b" and so on. Is this relatively easy to do with Python? I think I am almost there with this code but I can't get the last part.
test_directory = "./topfolder"
for child in os.listdir(test_directory):
test_path = os.path.join(test_directory, child)
if os.path.isdir(test_path):
print(test_path)