What will be the output of the following Python code?
>>>example = "helle"
>>>example.find("e")
Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
Which one of the following has the highest precedence in the expression?
What will be the output of the following Python code?
x = [12.1, 34.0]
print(' '.join(list(map(str, x))))
import time
t=(2010, 9, 20, 8, 15, 12, 6)
time.asctime(t)
What is the result of executing the expression '1' == 1?
What does the super()
method do?
What will be the output of the following Python code?
>>> import collections
>>> a=collections.namedtuple('a',['i','j'])
>>> obj=a(i=4,j=7)
>>> obj
What will be the output of the following code?
beginning, end = -5, 5
for number in range(beginning, end + 1):
if number <= 0:
print(number, end = ",")
What will be the output of the following Python code and state the type of copy that is depicted?
l1=[2, 4, 6, 8]
l2=[1, 2, 3]
l1=l2
l2