>>> my_list = [0, 2, 2]
>>> a = all(my_list)
>>> print(a)
Suppose list1 is [44, 33, 22, 14, 20], what is the value of list1[-1]?
snow = 26
cat = True
print "there are %s letters in the alphabet- %s" %('snow', cat)
The association between a URL and the function that handles it is called:
What will be the output of the following Python code?
>>> a={5,4}
>>> b={1,2,4,5}
>>> a<b
What is the correct sequence of the parameters in the range()
function?
m, n = map(int, input().split())
def function(m, n):
return m**n
m = function(m, n)**2
print(function(m, n))
If the entered string is 1 2, find the output of the above code.
Find the output of the following code:
>>> string = " Hello World "
>>> x = string.lstrip()
>>> y = string.strip()
>>> x, y
Guess the output of the following code:
import re
text="""
abcdefghijklmnopqrstuvwxyz
ABCDEFGH"""
pattern=re.compile(r'abc')
matches=pattern.finditer(text)
for match in matches:
print(match)