x = [7, [8, 9], 9]
y = len(x)
a = x[1][1]
print(x[2] + a)
>>>print('abcdef'.partition('cd'))
import turtle
t=turtle.Pen()
t.forward(100)
t.left(90)
t.clear()
t.position()
What will be the output of the following Python code?
d = {0, 1, 2}
for x in d.values():
print(x)
Which type of software testing involves testing the entire system according to the requirements?
Find the output of the following code:
a = 10
b = 20
c = 30
def fun():
yield a
yield b
yield c
val = fun()
print(next(val))
print(next(val))
print(next(val))
What will be the output of the following Python code snippet?
test = {1:'A', 2:'B', 3:'C'}
del test[1]
test[1] = 'D'
del test[2]
print(len(test))
Find the output of the following code:
x = ["Hello", "World"]
y = ["Hello", "World"]
z = x
print(x is y, z is x)
print(x == y, x == z)
What happens if the base condition isn’t defined in recursive programs?
What will be the output of the following Python code?
class Count:
def __init__(self, count = 0):
self.__count = count
c1 = Count(2)
c2 = Count(2)
print(id(c1) == id(c2), end = " ")
s1 = "Good"
s2 = "Good"
print(id(s1) == id(s2))