Đ Đinh Yến New member Jan 7, 2022 #1 How do I remove white space in Python? Answer Python String strip() function will remove leading and trailing whitespaces. If you want to remove only leading or trailing spaces, use lstrip() or rstrip() function instead.
How do I remove white space in Python? Answer Python String strip() function will remove leading and trailing whitespaces. If you want to remove only leading or trailing spaces, use lstrip() or rstrip() function instead.