You are given a string containing ten digits, write a program to print these digits in a human readable format.
There are some rules to how to read a number,
1. Divide the ten digit number into set of four-three-three digits
2.use the following prefixes for consecutive digits
# Single numbers just read them seperately
# 2 successive numbers use double
# 3 successive numbers use triple
# 4 successive numbers use quadruple
string = '0123456789'
print(string[:4], '-', string[4:7], '-', string[7:])
0123 - 456 - 789
Comments
Leave a comment