Computer Science
Consider the following code and find out the error:
tup1 = (10, 20, 30)
tup2 = tup1 * (3, )
Related Questions
Suppose
>>> d1 = { 1 : 'one' , 2: 'two' , 3: 'three' , 4: 'four'} >>> d2 = { 5 :'five', 6:'six' }Write the output of the following code:
>>> d1.items() >>> d1.keys() >>> d1.values() >>> d1.update(d2) >>> len(d1)Suppose
>>> d1 = { 1 : 'one' , 2: 'two' , 3: 'three' , 4: 'four'} >>> d2 = { 5 :'five', 6:'six' }Write the output of the following code:
>>> del d1[3] >>> print(d1) >>> d1.pop(4) >>> print(d1) >>> d1 [8] =' eight' >>> print(d1) >>> d1.clear() >>> print(d1)Consider the following code and find out the error:
tup1 = ('a', 'b', 'c') tup1 = tup1 + dConsider the following code and find out the error:
tup1 = ("Riya", ) * '4'