Python 52

Python 100 [Python 100] Python 100

|

0|0=0; 0|1=1; 1|0=1; 1|1=1

(Python 2.0+)

#!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = 0o77 b = a | 3 print ('a | b is %d' % b) b |= 7 print ('a | b is %d' % b)

a | b is 63
a | b is 63

Python 100 [Python 100] Python 100