• Python question of the day

    What would be the output of executing the following code:
    a = {1,2,6,8}
    b = {2,3,5,8}
    print((a) - (b))
     {1, 6}
     {1, 6, 5}
     (1, 6)
     (1, 6, 8)
    Explanation:
    The set difference finds elements that are unique ie. elements that are present in a, but not in b


    Top 100 python interview questions:


  • python bootcamp 2021
datai analytics