text_plain_output_1.png
s = '{} is a {} company'
p = s.format('Google', 'tech')
s2 = '{Company_name} is a {Company_type} company'
p2 = s2.format(Company_type='tech', Company_name='Google')
age = {'Anshuman': 22, 'Ayushman': 13, 'Bharati': 45}
a = 'profit is {:,}'
b = a.format(1234567890)

l1 = []
for i in range(1, 6):
    l1.append(i ** 2)
l2 = [i ** 2 for i in range(1, 6)]

l3 = []
for i in range(1, 11):
    if i % 2 == 0:
        l3.append(i)
l4 = [i for i in range(1, 11) if i % 2 == 0]

s1 = {i for i in range(1, 11) if i % 2 == 0}
s2 = {i ** 2 for i in range(1, 6)}

l1 = [1, 4, 65, 24, 83, 43, 21]
l1.sort()
def s(x):
    return x[1]
def s1(x):
    return x[0] + x[1]
l2 = [[1, 2], [3, 4], [2, 6], [7, 5]]
l2.sort()
l2.sort(key=s)
l2.sort(key=s1)
l3 = [[1, 2], [3, 4], [2, 6], [7, 5]]
l3.sort(key=lambda x: x[0] + x[1])

def check(x):
    return 'even' if x % 2 == 0 else 'ODD'
l1 = [1, 2, 3, 4, 5, 6]
l2 = []
for i in l1:
    l2.append(check(i))
print(l2)
l3 = list(map(check, l1))
print(l3)
l4 = [1, 2, 3, 4, 5, 6, 7, 8, 9]
l5 = [9, 8, 7, 6, 5, 4, 3, 2, 1]
l6 = list(map(lambda x, y: y - x, l4, l5))
print(l6)