Is python case sensitive
Which of these is not a core data type in Python?
Which of the following is not a declaration of the dictionary?
What will be the output of the following Python code?
data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
print(data[1][0][0])
What will be the output of the following Python code?
x = 'abcd'
for i in x:
print(i)
x = x.upper()
What will be the output of the following Python code?
d = {0: 'a', 1: 'b', 2: 'c'}
for i in d:
print(i)
Is the following Python code valid?
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
def func():
text = 'Welcome'
name = (lambda x:text + ' ' + x)
return name
msg = func()
print(msg('All'))
What will be the output of the following Python code snippet?
my_string = "hello world"
k = [(i.upper(), len(i)) for i in my_string]
print(k)
What is the output of the following Python code?
from abc import ABC, abstractmethod
class Sport(ABC):
@abstractmethod
def total(self):
pass
class Cricket(Sport):
def __init__(self, score1, score2):
self.score1 = score1
self.score2 = score2
def total(self):
return self.score1 + self.score2
series = Cricket(50, 60)
print(series.total())