Sep 27, 2024
app.py
).print()
function to output "Hello World".name = value
syntax.age = 20
, use print(age)
to display variable value.input()
function to receive user input.int()
, float()
, str()
, bool()
..upper()
, .lower()
, .find()
, .replace()
.string.upper()
converts a string to uppercase.in
keyword to check if a substring exists in a string.+
, subtraction -
, multiplication *
, division /
./
returns float, //
returns integer.%
returns remainder. Exponentiation **
for powers.+=
, -=
, *=
, /=
.()
, exponentiation **
, multiplication/division *
, /
, //
, %
, addition/subtraction +
, -
.>
, >=
, <
, <=
, ==
, !=
.and
, or
, not
.if
, elif
, else
for decision making.while
loop.for
loop..append()
, .insert()
, .remove()
, .clear()
.list[start:end]
.()
to define a tuple.