Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

#30 Python Tutorial for Beginners | Copying an Array in Python

534.8K views on YouTube

Check out our courses:

Agentic AI Engineering with Python : https://go.telusko.com/agentic-ai-python
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://go.telusko.com/learn-master
Coupon: TELUSKO10 (10% Discount)

For More Queries WhatsApp or Call on : +919008963671

website : https://telusko.com/

Udemy Courses:

Java Spring:- https://go.telusko.com/Udemyjavaspring
Java:- https://go.telusko.com/udemyteluskojava
Spring: https://go.telusko.com/udemyteluskospring
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopython
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodocker

Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20
WhatsApp : https://go.telusko.com/whatsapp
Discord : https://discord.gg/D8hWe9BqfF

In this lecture we will see:
– Addition of values in an array
– Different functions that can be performed on arrays
– What is Aliasing in python?
– Different ways of copying an array

#1
– We can add any value in each element of an array.
– We can also add values of two arrays.
– The addition of two arrays is known as Vectorized Operation.
– We can also find the values of each element of an array of mathematical operations such as sin, cos, tan, log, sqrt etc.
– Sum of every element of an array can also be calculated by using the sum() function.
– Minimum value can also be get from an array through the min() function.
– Maximum value can be get from an array by using the max() function.
– Unique elements from an array and the sorted array can also be get.
– Concatenation of two arrays can also be performed by using the concatenate function. This function combines two arrays.

#2
– Two variables can be pointed towards a single array. It means both variables are pointing to the same memory address where the array is stored.
– In Python, Aliasing happens whenever one variable’s value is assigned to another variable.
– view() is a function that helps to create a new array at a new location. It means arrays should be present at the different memory addresses.
– By using the view() functions, two variables will point towards two different arrays.

#3
– In python, two copying techniques are available i.e.,
1. Shallow Copy
2. Deep Copy
– In shallow copy, it will copy elements but it means both arrays are dependent on each other.
– In shallow copy, if we update an element in one array then the changes would also be reflected in another array.
– In a deep copy, two different arrays are not linked with each other in any way.
– In a deep copy, we use the function known as a copy() instead of using the view() function.
– copy() function provides a deep copy of an array.

Github :- https://github.com/navinreddy20/Python-

Python for Beginners :- http://bit.ly/3JOLQhl

Java and Spring Framework For beginners with Spring Boot : – http://bit.ly/3LDMj8D

Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN

Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmk…
Telusko Hindi :
https://www.youtube.com/channel/UCitz…

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
http://www.telusko.com/contactus