Replace strip() with rstrip()