python set data structure code example
Example 1: python sets
my_set = {}
my_set = set()
set_example = {1,3,2,5,3,6}
print(set_example)
Example 2: python set
set_example = {1, 2, 3, 4, 5, 5, 5}
print(set_example)
Example 3: data = a &b python
a = 60
b = 13
c = 0
c = a & b;
print "Line 1 - Value of c is ", c
c = a | b;
print "Line 2 - Value of c is ", c
c = a ^ b;
print "Line 3 - Value of c is ", c
c = ~a;
print "Line 4 - Value of c is ", c
c = a << 2;
print "Line 5 - Value of c is ", c
c = a >> 2;
print "Line 6 - Value of c is ", c