Question
Write a Python function, called NoSpaces( ), that takes in a string as a parameter and returns the string re-written without any space characters. For
Write a Python function, called NoSpaces( ), that takes in a string as a parameter and returns the string re-written without any space characters. For example: NoSpaces(I still havent found what Im looking for) returns the string: IstillhaventfoundwhatImlookingfor Hint: use a for loop to go through each character in the sentence, like in the example of Listing 3.2 in the book (p. 95)
Write a generalizable Python function based on NoSpaces( ) from the previous question, called NoChar( ), that takes in 2 parameters: a string and a character. It returns the string without any of the character in it. For example: NoChar(Id rather be a hammer than a nail, a) returns the string: Id rther be hmmer thn nil
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