Python includes various built‐in data types designed for handling different types of data efficiently. For example, Python’s bool data type is designed for storing Boolean data, data that can be either True or False but no other possible value. Similarly, Python’s str data type is designed for storing strings of text.
Python’s built‐in data types mostly fall into six categories: numerics for numbers; sequences for data such as lists; mappings for dictionaries, where one item maps to another; classes for creating custom objects; instances for the objects created with those classes; and exceptions for handling errors.
The Python programming language is primarily implemented using C, a long‐standing and robust programming language that is still widely used across many industries. C is called a low‐level programming language, which means that it can interface directly with hardware features, lending itself to software and operating‐system development. C is relatively easy to understand but extremely hard to master.
Python is a high‐level programming language and includes many built‐in features that C does not natively support, giving you an easier way to harness some of the power of C to develop solutions rather than using C directly. Python’s extensive feature set and capability to run well on many platforms contributes to its great versatility.
Because Python is built on C, Python’s data types are constructed using combinations of C’s data types. For example, Python includes a data type called set that enables you to store multiple pieces of information in a single variable — a capability that C itself does not directly provide. Furthermore, some of Python’s more complex data types are constructed using simpler Python data types.
0 comments:
Post a Comment