input: def can_fly(q, w):
      '''
      Write a Python function that determines whether the object q can take flight. Return True if q can fly and False otherwise.
      The object q can fly if it is symmetrical (i.e., it forms a palindromic list) and the total of its elements does not exceed the maximum allowed weight w.
  
      Example:
      can_fly([1, 2], 5) ➞ False 
      # 1+2 is less than the maximum allowed weight, but it is not symmetrical.
  
      can_fly([3, 2, 3], 1) ➞ False
      # It is symmetrical, but 3+2+3 exceeds the maximum allowed weight.
  
      can_fly([3, 2, 3], 9) ➞ True
      # 3+2+3 is within the maximum allowed weight, and it is symmetrical.
  
      can_fly([3], 5) ➞ True
      # 3 is within the maximum allowed weight, and it is symmetrical.
      '''
output:     if q == q[::-1] and sum(q) <= w:
          return True
      return False