Comment
Comment by DavinMiler
The terms "gender" and "sex" are defined differently by different people, but in general the definition is something like this:
Sex is usually defined in terms of genitalia, genotype (chromosomes) or similar biological properties. However, this is still not a binary male/female property, see for example intersex people. Depending on your definition, undergoing surgery may change your sex, gender, or both.