|
META TOPICPARENT |
name="WorkshopSlides" |
Slide 1: Introduction to Internet of Things (IoT) |
|
The operand to the left of the = operator is the name of the variable and the operand to the right of the = operator is the value stored in the variable.
|
|
< < |  |
> > |
Data Types in Python
Programs store data in one form or the other and must be of a certain type.
We discuss the following data types
- Strings
- Lists
- Tuple
- Dictionary
- Byte
- Array
String in Python
Strings in Python are identified as a contiguous set of characters represented in the quotation marks.
Python accepts either pair of single, double quotes and triples(single/double) quotes.
List in Python
The list is a most versatile datatype available in Python.
It can be written as a list of comma-separated values (items) between square [] brackets.
A list need not be of the same type.
The values present in a list are indexed starting from zero.
The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1.
Tuple in Python
Tuples are much more like a list.
They are enclosed in brackets().
Their content cannot be changed unlike the list whose content can be changed.
Thus tuples are read only. |
|
%SLIDESHOWEND% |
|
Comments |
|
< < | |
> > |
|
|
META FILEATTACHMENT |
attachment="workshop.png" attr="" comment="" date="1559196142" name="workshop.png" path="workshop.png" size="256416" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="commandline.png" attr="" comment="" date="1560048291" name="commandline.png" path="commandline.png" size="62665" user="IsaacArmahMensah" version="2" |
|
|
META FILEATTACHMENT |
attachment="runcmdlineArg.png" attr="" comment="" date="1560051017" name="runcmdlineArg.png" path="runcmdlineArg.png" size="26649" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="variable.png" attr="" comment="" date="1560114615" name="variable.png" path="variable.png" size="75799" user="IsaacArmahMensah" version="3" |
META FILEATTACHMENT |
attachment="thonny.png" attr="" comment="" date="1560114164" name="thonny.png" path="thonny.png" size="124394" user="IsaacArmahMensah" version="1" |
|
|
> > |
META FILEATTACHMENT |
attachment="string.png" attr="" comment="" date="1560140515" name="string.png" path="string.png" size="257733" user="IsaacArmahMensah" version="2" |
META FILEATTACHMENT |
attachment="list.png" attr="" comment="" date="1560142651" name="list.png" path="list.png" size="178624" user="IsaacArmahMensah" version="1" |
|