Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
python list copy 1

python list copy

April 22, 2022 by Anurag batra
thislist = ["apple", "banana", "cherry"]
mylist = thislist.copy()
print(mylist)

Here is what the above code is Doing:
1. We create a list called thislist.
2. We create a copy of thislist, and assign it to mylist.
3. We print the value of mylist.

Categories Python Examples
Post navigation
python chromedriver headless selenium
how to pass header in requests
© MyEduKit - 2022 . All Rights Reserved.