Question: Python 3 (10 points) Write a program that takes a string of words separated by a space from the user: rts is to a list
(10 points) Write a program that takes a string of words separated by a space from the user: rts is to a list of strings (use whitespace as the separator); then if an element of the list is a conve string of digits, the program converts it to a whole number (positive integers), and replaces the corresponding element of the list with this number. The conversion should be done for all such elements (that are whole numbers, written as a string) Example of input-output: Input (from the user): Hello buy mind 5 abc 12 0 1243 thank you sorry 432 mind 5 Hello George Output: [ Hello', buy','mind',5, abc , ? 201 243, thank you','sorry, 432, mind ,5. Hello ,George
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
