Python: Objects, mutable and immutable

What’s an Object Oriented Language?

What’s an object?

What is id() and type() in python?

  • type(object) -> one argument passed
  • type(name, bases, dict) -> three argument passed

Mutable and Immutable Objects

Immutable objects

Trying to change the first value to 0 in a tuple
Trying to change the first value of the string to ‘L’

Mutable objects

Arguments

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store