from typing import Any
def AcceptAnyType(x: Any):
if isinstance(x, list):
print("x is a list.")
elif isinstance(x, dict):
print("x is a dictionary.")
else:
print(f"x is of type: {type(x)}")
AcceptAnyType({1: "C", 2: "Java", 3: "Python",})
AcceptAnyType([1, 2, 3])
AcceptAnyType(9001)
AcceptAnyType(3.14)
AcceptAnyType('a')
AcceptAnyType("XYZ")
AcceptAnyType(True)
'''
run:
x is a dictionary.
x is a list.
x is of type: <class 'int'>
x is of type: <class 'float'>
x is of type: <class 'str'>
x is of type: <class 'str'>
x is of type: <class 'bool'>
'''