Q:

Pipe character in object creation

I have run into the following code:  
f = wx.Frame(None, -1, 'Window Title', style = wx.MAXMIZE_BOX | wx.SYSTEM_MENU)

I have read other answers about this on Stack Overflow that said the '|' had something to do with bitwise operations but I don't think that is the use here and if it is I don't understand it. Can someone explain what this character is used for in this situation?

A:

Bitwise or really is the use here.
wx.MAXIMIZE_BOX, wx.SYSTEM_MENU, etc. are all integer constants with only a single bit set. (A different bit for each constant.) So, you can bitwise-or them together to get a collection of bits. 
This is almost exactly like doing a union operation on a set. In fact, set union is also spelled | in Python. The difference is that when you're using single-bit integers, the whole set fits into a single fixed-sized integer, instead of being stored as a collection of a bunch of separate values. This is usually not so important for Python, but is—or at least used to be—for the low-level windowing APIs (mostly written in C) that wx deals with.
Let's take a simpler example:
>>> a = 0b00000001
>>> b = 0b00000010
>>> c = 0b00000100
>>> d = 0b00001000
>>> acd = a | c | d
>>> bin(acd) # notice that the a, c, and d bits are all set, but no others
'0b1101'
>>> bool(acd & c) # is c an element of acd?
True
>>> bool(acd & b) # is b an element of acd?
False

So I can pass around a set of 8 separate boolean values in a single byte. Well, this being Python, that "single byte" is still an 8-byte pointer to a 28-byte int object whose underlying value has a minimum size of 4 bytes, so I've really just made things slower and more complicated for minimal space benefit. But still, if you need to store zillions of these…
Anyway, just as we're using |, bitwise or, to mean union, we're using &, bitwise and, to mean intersection.
That bool(… & …) may be a bit confusing, until you realize that the intersection of a set with a single element is either that single element (if it's a member of the set), or 0 (if it's not). In Python, 0 is always falsey, all other numbers are always truthy.

As tripleee points out in the comments, when your values are all single-bit values, and there are no repeats, | and + actually do the same thing:
>>> bin(a | c | d)
'0b1101'
>>> bin(a + c + d)
'0b1101'

Just think about how you add things up on paper and carry the 1. Bitwise or is like adding up the columns and ignoring the carry. So, when there is no carry (because we don't have any bits showing up more than once), they do the same thing. Of course once that's no longer true, carrying the 1 and ignoring the 1 are no longer the same:
>>> bin(acd | c)
'0b1101'
>>> bin(acd + c)
'0b10001'

