Python Basics – Part 1
Let’s start with Python basics, with the help of program .Theory part in posts is just enough to understand the program.
Python Data Type:
- Numbers
- Strings
- List
- Tuple
- Dictionary
- Numbers :
- Int 1 ,10,-145, 22
- Float 1.1,0.9,-29.9
- Complex 1.4j, 4e+6j
- Strings
Way to remember how slices work in string is to think of the indices as pointing between characters, with the left edge of the first character numbered 0. Then the right edge of the last character of a string of n characters has index n, for example:
“Crazyouters ” represented in indices form
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| C | r | a | z | y | r | o | u | t | e | r | s |
| -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 |
Program Code : Str.py

Output

There are special operators in strings
Program Code : str1.py

Output

3. List
The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Important Continue reading

How can network operators make IoT service profitable?