What will be the output of the following Python code?
def foo(x): x[0] = ['def'] x[1] = ['abc'] return id(x) q = ['abc', 'def'] print(id(q) == foo(q))
निम्नलिखित Python कोड का आउटपुट क्या होगा?
def foo(i, x=[]): x.append(x.append(i)) return x for i in range(3): y = foo(i) print(y)
def f1(): x=15 print(x) x=12 f1()
def f1(): x=100 print(x) x=+1 f1()
def san(x): print(x+1) x=-2 x=4 san(12)
def f1(): global x x+=1 print(x) x=12 print("x")
def f1(x): global x x+=1 print(x) f1(15) print("hello")
def f1(a,b=[]): b.append(a) return b print(f1(2,[3,4]))
def f(p, q, r): global s p = 10 q = 20 r = 30 s = 40 print(p,q,r,s) p,q,r,s = 1,2,3,4 f(5,10,15)