List:
In Python, the sequence of various data types is stored in a list. A list is a built-in data structure in Python, which is the collection of different kinds of values or items. Every item in the list, also known as the Index, has an address allocated to it. The index value begins at 0 and continues until the final component, which is the positive index. You can also retrieve elements from last to first using negative indexing, which starts at -1. Integers – This value is represented by int class. It contains positive or negative whole numbers (without fractions or decimals). In Python, there is no limit to how long an integer value can be.
Lists are created using square brackets, and then the elements are added accordingly. If none of the elements are entered in the square brackets, then an empty list would be created.
The most common associated method of lists are list(), append(), insert(), extend(), sort(), reverse(), remove(), pop(), clear() etc.
Example: Var = [10, 20, 14]
List Data Types
Moderator: ramajayam
Re: List Data Types
Nicely explained sir. However, python has limit for integers, the maximum number is around 9.22x10^18. So integer cannot be longer than 19 digits. However, in all practical applications, the required numbers are much lesser than this.
-
Rathinagiri
- Posts: 34
- Joined: Thu Mar 07, 2024 9:35 pm
Re: List Data Types
Yes. You are right. It is because of the current architecture which is 64 Bit. When we have 128 Bit architechture, it will be squared! 