What are Tuples in Python.
By definition Tuples are immutable data types which store a collection of objects.
Creating a tuple is as simple as putting different comma-separated values. Optionally you can put these comma-separated values between parentheses also.
Like string indices, tuple indices start at 0, and they can be sliced, concatenated, and so on.
Tuples are immutable which means you cannot update or change the values of tuple elements. You are able to take portions of existing tuples to create new tuples as the following example demonstrates −
Tuples are immutable but potential changeable.
What are Pointers?
If you’ve ever worked with lower level languages like C or C++, then you’ve probably heard of pointers. Pointers allow you to create great efficiency in parts of your code. They also cause confusion for beginners and can lead to various memory management bugs, even for experts.
Pointers are widely used in C and C++. Essentially, they are variables that hold the memory address of another variable. Lets understand pointers with simple real world analogy.
Why Python does not have Pointers?
Pointers seem to go against the Zen of Python. Pointers encourage implicit changes rather than explicit…
Software Developer during day time, blogger at night.