Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

new line character python

# When you want to print in a new line you can write '
' to indicate the start of the line
# Remember '
' is one character not two
stuff1 = 'Hello
World!'
print(stuff1)       # Output: Hello
                    #         World
stuff2 = 'X
Y'
print(stuff2)       # Output: X
                    #         Y
print(len(stuff2))  # Output: 3
Source by www.py4e.com #
 
PREVIOUS NEXT
Tagged: #line #character #python
ADD COMMENT
Topic
Name
2+1 =