[Solved] How do I remove all white space in any given input? [closed]


This isn’t elegant, but you could strip line endings, then replace the spaces and tabs:

askuser = askuser.strip().replace(' ','').replace('\t','')

solved How do I remove all white space in any given input? [closed]