Jul 11, 2024
print("Hello World")
print
is a function"Hello World"
is a string (textual data)age = 20
print(age)
first_name
)input
function: name = input("What is your name?")
print("Hello " + name)
int
, float
, bool
, str
upper()
, lower()
, find()
, replace()
in
keyword+
, -
, *
, /
, //
(integer division), %
(modulus), **
(exponentiation)+=
, -=
, *=
, etc.>
, <
, >=
, <=
, ==
, !=
and
, or
, not
if
, elif
, else
while
condition, update variablefor item in numbers
range
Functionrange(5)
, range(5, 10)
, range(5, 10, 2)
for
loopsnames = ["John", "Bob", "Mosh"]
names[0:3]
append()
, insert()
, remove()
, clear()
in
operatorlen()
numbers = (1, 2, 3)
count()
, index()