'What is the meaning of 'trailing newline is stripped'?
This is a term I found in a programming tutorial. What does it mean?
Solution 1:[1]
It means that new line character '\n' at the end of a string is removed. For example, in the command line output you ask a user to input something:
"""
C:\Users\Admin>
Please, input something: _
"""
And user's input will start from the place where the underscore character is. Otherwise, (if not 'trailing newline is stripped'), user's input will start from the new line. (See where the underscore character is).
"""
C:\Users\Admin>
Please, input something:
_
"""
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alex Kuchin |
