H2O2 分子結構 is H-O-O-H. Which means in H2O2, 1 O bonds with 1 H and 1 O, and 1 H bonds with 1 O. 點解唔係2- ? Because O-O is a covalent bond, both O are sharing 1 electron. Therefore there is no oxidation number. Oxidation number depends on the bond.
If let's say the first O in O-O is slightly ionic then both O have an oxidation number of either +1, -1 or -1, +1. If the oxidation number of that atom is a digit without + or -, it is sharing that number of electron. For example N has 5, 4, 3, 2, 1 possible oxidation numbers. You do not see the + or - because they are shared when bonding.
Back to topic, because both O in H2O2 are together having 2 sharing electrons and 1 for each in bonding to H, therefore the oxidation numbers of O are only -1 only.