Sep-14-2019, 10:30 AM
Hey guys.
Here is what I have to accomplish:
● Ask the user to input a string and then ask the user which characters they would like to make disappear.
For example: The quick brown fox jumps over the lazy dog.
o After stripping a,e,i,o,u
o Th qck brwn fx jmps vr th lzy dg.
Here is what I came up with but clearly my code is flawed somewhere, can someone please point out where I am going wrong with this.
Here is what I have to accomplish:
● Ask the user to input a string and then ask the user which characters they would like to make disappear.
For example: The quick brown fox jumps over the lazy dog.
o After stripping a,e,i,o,u
o Th qck brwn fx jmps vr th lzy dg.
Here is what I came up with but clearly my code is flawed somewhere, can someone please point out where I am going wrong with this.
string = input("Enter a sentence here: ") characters = input("Enter the characters which you would like to remove from the sentence above. Example: 'W','k','p','o' \n") stripped_str = string.strip(characters) print(stripped_str)