"the quick brown fox jumped over the lazy dog".find("quick")
age = 30
height = 180
name = "ben"
score =85
"hi {}, happy {} birthday, your height is {}, your score is {}".format(name, age, height, score)
age = 30
height = 180
name = "ben"
score =85
"hi {2}, happy {0} birthday, your height is {1}, your score is {3}".format(age, height, name, score)
x= """hi {0},
{0} is a nice name
goodbye {0}
""".format(name, "this is not used")
print(x)
"{}".format(10/3)
import math
math.sin(math.pi)
"{:.2f}".format(math.sin(math.pi))
"{:.20f}".format(math.sin(math.pi))
ord(' ')
"0x{:x}".format(ord(' '))
"{:.2}".format(math.sin(math.pi))
"""
steak: 150.00 NIS
pita: 1.50 NIS
shakshuka im thi na: 25.00 NIS
vat% 17.00 %
vat: 35.56
total: 222.40 NIS
"""
print("{:7.2f}".format(1.5))
print("{:7.2f}".format(222.49))
print("{:7.2f}".format(-10))
print("{:+7.2f}".format(1.5))
print("{:+7.2f}".format(222.49))
print("{:+7.2f}".format(-10))
print("{:^10.2f}".format(1.5))
print("{:^10.2f}".format(222.49))
print("{:^10.2f}".format(-10))
print("{:-^10.2f}".format(1.5))
print("{:-^10.2f}".format(222.49))
print("{:-^10.2f}".format(-10))
print("{:#x}".format(32))
print("{:#o}".format(32))
print("{:#b}".format(32))
print("{:#d}".format(32))
x= "hi {2}, happy {0} birthday, your height is {1}, your score is {3}".format(age, height, name, score)
print(x)
x = f"hi {name}, happy {age} birthday, your height is {height}, your score is {score}"
print(x)
print(f"""freedom is the right to say that {1}+{1} = {1+1}""")
print(f"""{"the quick brown fox".upper().replace("FOX", "cat")}""")