Mastery09

9.Basic types and their use in Python

These are the few basic types in Python.

Integer: It refers to all integer numbers, negative and positve, than can be used in python, in order to create mathematical equations in your program.

Float: This time it refers to decimal numbers, like 1.5, numbers that don’t fit into the integer category.

String: It can be any sort of character, but it is preferred to be just letters, it be written inside of quotes. “Like this”.

List: A list is a serie of data that can be change anytime, like x = [1, two, 3]

Tuple: A tuple however, is pretty much a list that you can’t change, it is expresed like x = (1, two, 3)

Dictionary: As a real life dictionary, this is an array of data, that explains the significance of a “key” word. For example {Sun : The nearest star to earth and its main source of light  }

CC BY 4.0 Mastery09 by Alejandro Abreu is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.