GET 70% Discount on All Products Coupon code: "Board70"
Which one of the platform module functions should be used to determine the underlying platform name?
platform.uname ()
platform.platform ()
platform.python_version()
platform.processor()
Which of the following statement are true? (Select two answers)
closing an open file is performed by the closefile ( ) function
the second open ( ) argument describes the open mode and defaults to ‘w’
if open ( ) ‘s second argument is ‘r’ the file must exist or open will fail
if open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lost
Is it possible to safely check if a class/object has a certain attribute?
yes, by using the hasattr attribute
yes, by using the hasattr ( ) method
yes, by using the hassattr ( ) function
no, it is not possible
TESTED 24 Nov 2024