Answers for "does python strip remove newline"

2

python strip newline from string

a_string = a_string.rstrip("n")
Posted by: Guest on July-01-2020
0

Using strip() method to remove the newline character from a string

# strip() method to remove newline characters from a string
text= "n Welcome to Python Programming n"
print(text.strip())
Posted by: Guest on December-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language