I reworked a bit of an old script I had, but this should be close to what you need (Untested).
The original post that is based off of is here if you need more refernece. https://community.esri.com/thread/107816
import arcpy
import os
workspace = r"workspacepath"
out_mdb = r"filepathtomdbhere"
for dirpath, dirnames, filenames in arcpy.da.Walk(workspace,datatype="FeatureClass"):
for filename in filenames:
arcpy.CopyFeatures_management(os.path.join(dirpath , filename) , os.path.join(out_mdb , filename.strip(".shp")))