I think you need to go with a betta instead. lol
One: Swordtails get big(anywhere from four to seven inches in length, hitting the seven inch mark is fairly rare but it does happen! I have a seven inch long male myself, my other males didn't get near as big as he), females are bigger than males, not as long in the tail since they lack the sword, but they are very thick bodied in comparison, and about as long minus the sword. They require a lot of space for themselves, and whereas ten gallons would be sufficient for each one, keeping ONE in a ten gallon tank wouldn't be very nice.
Two: Swordtails are social, they need groups of three or more. Four or more is better, really, but a group of three is doable...but not in a ten gallon tank.
A ten gallon tank would be -ok- as a temporary QT tank, birthing tank or something for a single swordtail(I used my ten gallon as a birthing tank for my female, she got really unhappy about it...), but it's not good for them long term, and they really dislike being away from the group. They aren't like schoolers to where they fully rely on the school for all their worldly comforts, but they do require them to feel a certain amount of security and to hang out when needed and keep stress down. In other words they're not tight swimming groups like say...some types of tetras are, but they need them there.
If you want swordtails, get yourself a 25-30 gallon tank and get 3-5 of them. =)