What is the output of hash(True)
?
s = time.time()
t= time.time()
s == t
What is the output of the following code?
a=11
b=4
a+=b
print(a)
a=+b
print(a)
What is the output of the given code?
a=-5
b=4
print(a==b)
print(a<=b)
Which method of the String object is used to make the first letter of a string capital?
Given the following code:
a = True
b = False
c = False
if a or (b and c):
print("Hello")
else:
print("World")
What will be the output of the following Python code?
import sys
sys.stdin.readline()
Sanfoundry
What will be the output of the following Python code?
>>>print("D", end = ' ')
>>>print("C", end = ' ')
>>>print("B", end = ' ')
>>>print("A", end = ' ')
What is the output of the given code?
counter = {}
def addTo(country):
if country in counter:
counter[country] += 1
else:
counter[country] = 1
addTo('China')
addTo('Japan')
addTo('china')
print len(counter)