Professional Documents
Culture Documents
Data Science - Lab 01
Data Science - Lab 01
Data Science - Lab 01
by creating a python file on the server, using the .py file extension, and
running it in the Command Line:
Variables do not need to be declared with any particular type, and can even
change type after they have been set.
Variable names are case-sensitive.
String variables can be declared either by using single or double quotes
Python variables and data types (cont.)
Built-in Data Types
In programming, data type is an important concept.
Variables can store data of different types, and different types can do
different things.
Python has the following data types built-in by default, in these categories:
Operators
Operators are used to perform operations on variables and values.
Python divides the operators in the following groups:
•Arithmetic operators [+, - , * , / , % , ** , // ]
•Assignment operators [= , += , -= , *= , /= , **= , //= , …]
•Comparison operators [== , != , > , >= , < , <=]
•Logical operators [and , or , not]
Data Structures
Lists are used to store multiple items in a single variable.
Lists are created using square brackets