I am having trouble changing the format of a user input of an 8 digit number (XXXXXXXX) into this format, (XXX-XX-XXX) if I could get help with this that would be great thanks!!!
Asked
Active
Viewed 44 times
0
-
Show us what you did try and we can help you correct that. – Martijn Pieters May 28 '16 at 02:20
-
You could use slicing together with simple concatenation. If you have no idea, what I'm talking about, I could suggest reading something like [this](http://pythoncentral.io/cutting-and-slicing-strings-in-python/). – Marian May 28 '16 at 03:12