You are on page 1of 3

A = {1,2,3,4}

B = {5,6,4}

#print(A.union(B)) # union creates a new set & set A ,B remained same

#print(B.union(A))

#print(A|B) #creates a new set & set A ,B remained same

#print(B|A)

A.update(B)

#print(A) #updates set A

#print(B) # unchanged

C = [3,8,9,6]

#print(A.union(C)) # union even C is a list

#print(A|C) #error C is not a set

A |= B

print(A) #updates set A

print(B) # unchanged

(f)

print(t)

s
def print_formatted(number):
    # your code goes here
    for i in range(1,n+1):
      print(str(i).rjust(2),str(oct(i)[2:]).rjust(2),str(hex(i)
[2:]).rjust(2),str(bin(i)[2:]).rjust(2))
  

if __name__ == '__main__':
    n = int(input())
    print_formatted(n)
new

s = {1,2,5,4}

#s.add(8)

print(s)

f= frozenset(s)

print(f)

t=min

You might also like