Skip to content
Advertisement

How to format a user input into a different out put?Python

How can from an input (10 number): XXXXXXXXXX

convert into : X.XX.XX.XX.XXXX

So far this is my code:

JavaScript

OUTPUT:

JavaScript

Advertisement

Answer

Adding to answer by @Sefan, keep prompting the user until the correct format is recevied:

JavaScript
Advertisement