DEV Community

shalomtash
shalomtash

Posted on • Updated on

Ultimate Python Tutorial For Beginners

INTRODUCTION TO PYTHON
Python is one of the high level programming languages just like Java. A high level programming language means it is closer to the human language e.g., print('hello world!').

So as to understand what python is with less time wastage, I have outlined various key concepts to read about such include;

  • Variables

  • Operators

  • Data Types

  • Conditions

  • Loops

  • Exception Handling

  • Lists

  • Dictionary

  • String Operations

  • File Operations

VARIABLES
-This are whole numbers [0,1,2,3,4,5,6,7,8,9].

DATA TYPES
-Data types are the classification or categorization of knowledge items. This represents the type useful to be performed for a specific data.
There are 4 data types. This includes:

  1. string - This are alphabetic letters str('a', 'b', 'c', 'd').

  2. Boolean(bool) - This are True or False statements. They can even be represented using 0 to mean False and 1 to mean True.

3.Float - This are decimal numbers. e.g., 0.12 .

4.Complex - This is a building function in python which is rarely used . Complex number(real number + the imaginary number) .

LOOPS
Loop is iterable object such as a list, tuple, set etc.

CONDITIONS
They are statements that are used to show if a statement is true or not true . e.g., if... else .

STRING OPERATIONS
They are special string operators .
example
* its used to concatenate multiple copies of the same string .
[] they give a character of the same index .
[:] it gives character from a given range .

LISTS
They are used to store multiple items in a single variable. e.g., grocery = ['kales', 'tomatoes', 'onions'].

FILE OPERATIONS
They are inbuilt functions

e.g.,
r used to open a file for reading .

Top comments (0)