Aug 9, 2024
app.py
).print()
function to display messages:
print('Hello World')
age = 20
age = 30
).name = 'Mosh'
price = 19.95
input()
function to read user input:
name = input('What is your name?')
+
operator.int()
, float()
, str()
, and bool()
.+
, -
, *
, /
, //
, %
, **
(exponentiation).+=
, -=
, etc.>
, <
, >=
, <=
, ==
, !=
and
, or
, not
if temperature > 30:
print("It's a hot day.")
i = 1
while i <= 5:
print(i)
i += 1
names = ['John', 'Bob', 'Mosh']
names[0]
names[0] = 'Jane'
append()
, insert()
, remove()
, clear()
, count()
, index()
.numbers = (1, 2, 3)