Answers for "python problem append same value"

0

python problem append same value

a1 = [1, 'x', 'y']
a2 = [1, 'x', 'y']
a3 = [1, 'x', 'y']

b = [2, 3]

a1.append(b)
a2.insert(3, b)
a3.extend(b)

print(a1)
print(a2)
print(a3
Posted by: Guest on April-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language