Feb-26-2018, 11:20 PM
I'm having some issues figuring out a way to transform a random number, that ranges from 2-5 characters in length. I'm trying to format the first 3 characters, regardless of spaces, to the following format.
Input = '12345'
Expected_Result = '1 2/3'
This is what I have so far, but it is not dynamic with spaces. Any help will be appreciated.
Input = '12345'
Expected_Result = '1 2/3'
This is what I have so far, but it is not dynamic with spaces. Any help will be appreciated.
bit_size= '618' print('{} {}/{}'.format(*bit_size))