下表列出了所有的Python语言的支持位运算符。假设变量a持有60和变量b持有13,则: 示例: 试试下面的例子就明白了所有的Python编程语言提供了位运算符: #!/usr/bin/python a = 60 # 60 = 0011 1100 b = 13 # 13 = 0000 1101 c = 0 c = a & b; # 12 = 0000 1100 print "Line 1 - Value of c is ", c c = a | b; # 61 = 0011 1101 print "Line 2 - Value of c is ", c c