This isn’t elegant, but you could strip line endings, then replace the spaces and tabs:
askuser = askuser.strip().replace(' ','').replace('\t','')
More Related Contents:
- Python get for loop result into an array variable [closed]
- pygame installation issue in mac os
- How can I include a folder with cx_freeze?
- Reading a huge .csv file
- What is the purpose of the -m switch?
- Convert bytes to int?
- Can’t import my own modules in Python
- Process to convert simple Python script into Windows executable [duplicate]
- SQLAlchemy ORM conversion to pandas DataFrame
- How do I call setattr() on the current module?
- CURL alternative in Python
- How to print UTF-8 encoded text to the console in Python < 3?
- How to display utf-8 in windows console
- PIL and pygame.image
- Benefits of panda’s multiindex?
- Pandas pd.Series.isin performance with set versus array
- Python: Continuing to next iteration in outer loop
- Capitalise every other letter in a string in Python? [closed]
- python packaging for relative imports
- How to extract an element from a array in pyspark
- Pandas dataframe – running sum with reset
- Write two-dimensional list to JSON file
- How to convert string to Title Case in Python?
- Convert List to Pandas Dataframe Column
- Changing colour of a surface without overwriting transparency
- Customize argparse help message
- Read random lines from huge CSV file
- How do I call a method from another method?
- How to add a footnote under the x-axis of a plot
- Select elements of numpy array via boolean mask array