Interpreter Expressions
I LOVE DOING THIS :)
Expressions are representations of values, they are totally different from statements and functions since they perform any action, Meanwhile expressions are just the representation
Create an Expression
They only contain Identifiers, Literals, and Operators
Any name that is used to define a class, function, variable module, or object is an Identifier
There are the string literals, byte literals, integer literals, floating point literals, and imaginary literals, basically which means the independent usage of data types
Operators are nothing but + - * / % > < >= <= == >> <<
List Expression
One liner syntax - for loop
Dictionary Expression
One liner syntax - for loop
Generator Expression
One liner syntax - for loop
Will initialize a generator object that returns the values within 5 when the object is called
Conditional Expressions
true_value if Condition else false_value
Last updated