What will be the output of the following Python code?
print("abcdef".center())
print("xyyzxyzxzxyy".count('yy', 1))
print("Hello {} and {}".format('foo', 'bin'))
What will be the output of the following Python function?
all([2,4,0,6])
print('ab'.isalpha())
What will be the output of the following Python code snippet?
print('my_string'.isidentifier())
min(max(False,-3,-4), 2,7)
hex(15)
print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
def foo(i, x=[]): x.append(i) return x for i in range(3): print(foo(i))
x=1 def cg(): global x x=x+1 cg() x
print("Hello {0} and {1}".format('foo', 'bin'))
list(enumerate([2, 3]))
def f1(): x=100 print(x) x=+1 f1()
Observe the following Python code?
def a(n): if n == 0: return 0 else: return n*a(n - 1) def b(n, tot): if n == 0: return tot else: return b(n-2, tot-2)
print('1.1'.isnumeric())
What will be the output of the following Python expression?
round(4.5676,2)?
l=[] def convert(b): if(b==0): return l dig=b%2 l.append(dig) convert(b//2) convert(6) l.reverse() for i in l: print(i,end="")
def f(p, q, r): global s p = 10 q = 20 r = 30 s = 40 print(p,q,r,s) p,q,r,s = 1,2,3,4 f(5,10,15)
def foo(): total += 1 return total total = 0 print(foo())
def foo(): return total + 1 total = 0 print(foo())
What will be the output of the following Python functions?
x=3
eval('x^2')
print('abcdefcdghcd'.split('cd', -1))
x=100 def f1(): global x x=90 def f2(): global x x=80 print(x)
print(''''''.isspace())
print('ab,12'.isalnum())