Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 1
Unfortunately you code won't work as you want here in SoloLearn because SoloLearn's code playground input system is not interactive like your normal computer console.
I'm pretty sure this code will work fine in computer or other interactive ide.