Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started