adplus-dvertising
frame-decoration

Question

The two snippets of codes shown below are equivalent. State whether true or false.
CODE 1
  @f
def f1():
        print(“Hello”)
CODE 2
  def f1():
         print(“Hello”)
f1 = f(f1)

a.

True

b.

False

c.

May be

d.

Can't say

Posted under Python

Answer: (a).True

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The two snippets of codes shown below are equivalent. State whether true or false.