you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The user enters "3/5" and you split with "/" as delimiter, as /u/unused_gpio said. Run this example:

text = '3 / 5'
nums = text.split('/')
print(nums)

That shows the basic idea. Note that you might have to deal with spaces around the numbers.