Is there a way to convert random numbers between 0 to 99 to a word without writing a line of script for each one individually? For example it takes 2 and turns it into "two". (without using any external libraries)
Asked
Active
Viewed 34 times
0
-
1You can use *inflect* as described [here](https://stackoverflow.com/a/25026089/13778504). – Sarethe Aug 16 '22 at 05:31
-
Thank you for you help but I'm looking for a way without external libraries. – Faaez Usman Aug 16 '22 at 05:38
-
Without external libraries, the answer is no. – Kraigolas Aug 16 '22 at 05:43
-
Find a list of the word equivalents online and then put it into a dictionary. You can use Python itself to add the keys (with a for loop), so it's just about finding the list online. – Filip Müller Aug 16 '22 at 05:46