Python list copy

In this article, you’ll see how to copy a list in Python. The list has a built-in method to copy a list. I highly recommend you get the “Python Crash Course Book” to learn Python.

a = [10, 35, 40, 60, 70]
b = a.copy()
print(b)

Output:

[10, 35, 40, 60, 70]

Leave a Comment

Your email address will not be published.