Python 3: Back to basics

In python 3 we have 5 main basic types, which are: Booleans, numbers, integers, floats and fractions; which I’ll explain:

Booleans: Tells us if something is true or false

Numbers: Like the name say this variable let us save numbers

Integers: Only whole numbers (1,2,3,87108)

Floats: Numbers with decimals (1.1, 1.4831,24384.0053)

Fractions: (½, 412/30)

 

 

There are also other types as strings (which are sequences of Unicode characters, or in other words just plain text), lists (It is the most versatile datatype in Python, and like the name says it is a list of data, and this data doesn’t necessarily have to be of the same type.) tuples (tuple is a list, that once it is created it cannot be modified), sets (a set is like an un-ordered bag of unique values) and dictionaries(dictionary is a way to store data just like a list, the difference is that you can use almost everything to search for the data, pretty much like a database which lets you store data and also organize it)

 

Deja un comentario