Is it possible to input 2 numbers int or float separated by a comma in a single line?
Say after the program runs it would ask the user to Enter a range: then the user would input 2,3. So the variable range is [2,3]. As far as I know range_choice.split() is the only way.
Alternatively, if you want to allow commas in the second value, use
partitioninstead ofsplit:In this case, you’ll have to convert the two strings to numbers by yourself.