Explain it if you can

Pls explain https://code.sololearn.com/cS5mzZnnae0w/?ref=app

1/23/2020 8:03:58 PM

Anay Sah

6 Answers

New Answer


print function doesn't return a value. A function that "does not return a value" returns None. Thus None was assigned to variable x. type "function" returns the class of an object. Thus type(None) returns the class of None and the class of None was printed. (type is not actually a function, it is also a class, it is the class of classes)


when you write: x = print ("y") The variable x then points to the result of the function call: print("y"). And print is a function which returns nothing (=None) You would get the same result doing: def f(n): pass x = f("y") print(x)


help(print) clears the case. print is a function that returns None.


It is easy First you need to nude yourself Then lay down on the bed Remember: You need to get some oil and lay down in opposite direction Then someone comes And take feeling of ghapa ghap (Bsdk angrezi or npmat jaiyo)


Lol why would you even do that??? A print function shouldn't be used inside a variable.


In python every function returns something even if it does not have a return keyword.Those without the return value return None.Print method is one of those.You can see that its class is NoneType