12 Temmuz 2018 Perşembe

Python Conditional Statement: If Statement

Python IF...ELIF...ELSE Statements

if expression1:
   statement(s)
elif expression2:
   statement(s)
else:
   statement(s)
 
 

Example:

 

11 Temmuz 2018 Çarşamba

Python Datatypes: Dictionaries

Python's dictionaries are kind of hash table type. They work like associative arrays or hashes found in Perl and consist of key-value pairs. A dictionary key can be almost any Python type, but are usually numbers or strings. Values, on the other hand, can be any arbitrary Python object.