Answers for "ignore whitespace in python"

2

python string remove whitespace

' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'
Posted by: Guest on February-25-2021
0

remove trailing white space python string

vals_inp=input() 
list_set = list(vals_inp) 
vals = [x for x in list_set if x != ' '] 
set_vals = set(vals)
Posted by: Guest on October-24-2021

Code answers related to "ignore whitespace in python"

Python Answers by Framework

Browse Popular Code Answers by Language