What will be the output of the following Python code?
a=[10,23,56,[78]] b=list(a) a[3][0]=95 a[1]=34 print(b)
निम्नलिखित Python कोड का आउटपुट क्या होगा?
lst=[3,4,6,1,2] lst[1:2]=[7,8] print(lst)
a=[1,2,3] b=a.append(4) print(a) print(b)
a=[13,56,17] a.append([87]) a.extend([45,67]) print(a)
word1="Apple" word2="Apple" list1=[1,2,3] list2=[1,2,3] print(word1 is word2) print(list1 is list2)
def unpack(a,b,c,d): print(a+d) x = [1,2,3,4] unpack(*x)
places = ['Bangalore', 'Mumbai', 'Delhi'] places1 = places places2 = places[:] places1[1]="Pune" places2[2]="Hyderabad" print(places)
a= [1, 2, 3, 4, 5] for i in range(1, 5): a[i-1] = a[i] for i in range(0, 5): print(a[i],end = " ")
a = [1, 5, 7, 9, 9, 1] <br class="blank" />b=a[0] <br class="blank" />x= 0 for x in range(1, len(a)): if a[x] > b: b = a[x] b= x print(b)
a=["Apple","Ball","Cobra"] a.sort(key=len) print(a)
num = ['One', 'Two', 'Three'] for i, x in enumerate(num): print('{}: {}'.format(i, x),end=" ")
What will be the output of the following Python code snippet?
k = [print(i) for i in my_string if i not in "aeiou"]
What is the output of print(k) in the following Python code snippet?
k = [print(i) for i in my_string if i not in "aeiou"] print(k)
my_string = "hello world" k = [(i.upper(), len(i)) for i in my_string] print(k)
x = [i**+1 for i in range(3)]; print(x);
print([i.lower() for i in "HELLO"])
print([i+j for i in "abc" for j in "def"])
print([[i+j for i in "abc"] for j in "def"])
print([if i%2==0: i; else: i+1; for i in range(4)])