Programming, Python, Example, Object Oriented, Mastering.
method to validate if a pizza size is valid. class Pizza: # ... (previous code remains the same) @staticmethod def is_valid_size(size): return size in ["Small", "Medium", "Large"] # Using the static method print(Pizza.is_valid_size("Medium")) # Output: True print(Pizza.is_valid_size("XXL")) #