I have a dictionary:
exampledict = {'asdf':1, 'fasdfx':2, 'basdx':3, 'gasdf':4, 'gbsdf':5}
and I want to be able to input and search keys that contain a text (par example "asdf"), and return a new dictionary (newdict) with these keys and their values.
newdict = {'asdf':1, 'fasdfx':2, 'gasdf':4}
Which would be the most efficient way to do it in python 3.8 ?