data types
data types
Dynamically vs Statically Types
Java
Compile time errors
- Syntax error
- Statically Typed Languages –> check for type-mismatches
- All the variables should type-defined
Python
- Dynamically typed languaged
- One can use
type
function for checking the type of a data type.
Primitive Types
Java
int x = 10; char ch = ‘a’;
- primitive types - have limits.
Python
x = 10
x
is a reference to a value10
In Python everything is an object.