Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

Students also viewed these Databases questions

Question

Distinguish between the various types of interfund activity.

Answered: 1 week ago