Categories:Viewed: 4 - Published at: a few seconds ago

Write a python to check two numbers are greater than or equal or less than

def maximum(x, y):
    if x > y:
        return x
    elif x == y:
        return 'The numbers are equal'
    else:
        return y

print(maximum(2, 3))

Write a python to dict to zip and print as dictionary elements in original form

a={"a":1,"b":2,"c":3}
b=dict(zip(a.values(),a.keys()))
print(b)

Write a python program to delete an dictionary element

a={1:5,2:3,3:4}
a.pop(3)
print(a)

Write a python program to check two dictionary are equal or not

d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
d1 == d2

Write a python program to print only dictionary keys as list

d = {"john":40, "peter":45}
print(list(d.keys()))

Write a python program to check two lists are equal or not

a=[1, 4, 3, 5, 2]
b=[3, 1, 5, 2, 4]
print(a==b)

Write a python program to check two lists are equal or not

a=frozenset(set([5,6,7]))
print(a)