a={"name":1,"age":2}b={"name":1,"age":2,"course":3,"institute":4}bigger=max([("1st",a),("2nd",b)],key=lambdap:len(p[1]))print(f"{bigger[0]} dictionary has maximum keys, {len(bigger[1])}")
Output
2nd dictionary has maximum keys, 4
Learn the concept
New to this topic? Read the lesson, then come back.