Oct-03-2021, 08:03 PM
You can use the string method
split
to return a list of the words in the string, using sep as the delimiter string.sep
defaults to whitespaceuser_input = "7 * 7" first_number, symbol, second_number = user_input.split()