The output of the following code is: class<'dict'>.
type({})
Suppose list_val is [1, 2, 3, 4], what is the value of list_val[-1]?
Which of the following is an invalid variable name?
Output of following statement
print("*"+"hello".center(7)+"*")
What is the output of the following code?
def fun(x, y):
return x**x
print(fun(3))
Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?
Output of the following statement is
print("x".join("I am programmer".partition("am")))
What will be the output of the following Python code?
>>> a=(1,2,(4,5))
>>> b=(1,2,(3,4))
>>> a<b
Which of the statements about dictionary values if false?
What is the output of the given code?
def sortw(tup):
return(sorted(tup,key=lambda x:float(x[1]),reverse=True))
tuple=[('A',1.345),('b',2.688),('e',4.255)]
print(sortw(tuple))