Computer Science

Write a function namely fun that takes no parameters and always returns None.

Python Functions

3 Likes

Answer

def fun():
    return 
Explanation
def fun():
    return 
r = fun()
print(r)

The function fun() returns None. When called, its return value is assigned to r, which holds None. Then print(r) outputs None.

Answered By

2 Likes


Related Questions