1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Integers - float - complex
This data type is used to store numeric values. It creates a number object when a value is assigned to them
Example
var1 = 45 these can be deleted by using
var2 = 15 the command “del var1”
Numerical types -
Int / integers / any whole number
Float / any number that contains a decimal point
Complex / 3+4i / any complex numbers
Sequence - lists - tuples
List [] - a list is a type of data in python which can be written as comma separated values
var1 = [10,9,8,7] → int OR [10,”apple”,9,”banana” → list, str
Tuple () - an ordered collection of unchangeable collection of items
Colors = (“red”, “green”, “blue”) → tuple

How to check data type of variable declared
By using the type () method or by using the isinstance() method.
T
T