1# \n Makes A new Line.
2print("Hello \n World!")
3#Out Put
4#Hello
5# World!
6#Still Counts The Space!
1# To print a newline in python Python has a special charecter as \n with a
2# string.
3print("Hi\nHow are you")
4#The output of This program is:
5Hi
6How are you
7# But if you just print a new line like this:
8print("\n")
9# The output of this program is Two newlines:
10
11
12# It printed two newlines because if i say print("hi") and then print("hello")
13# Python prints them in seperate lines.This means that Python automatically
14# generates a newline with the print statement. So if we print("\n") Python
15# automattically generates a newline because of the print statement and then
16# it prints a newline which gives us two blank lines. So print("\n") therefore,
17# gives you two blank lines.
18
19# If you have to print a blank single newline you have to use print() or
20# print("") What this blank print statement does is Python automatically
21# generates a newline because of the print statement and then you print
22# nothing. So print() or print("") gives you a blank single new line.
23
24
25
26
27
28
1# To print a newline in python Python has a special charecter as \n with a
2# string.
3print("Hi\nHow are you")
4#The output of This program is:
5Hi
6How are you
7# But if you just print a new line like this:
8print("\n")
9# The output of this program is Two newlines:
10
11
12# It printed two newlines because if i say print("hi") and then print("hello")
13# Python prints them in seperate lines.This means that Python automatically
14# generates a newline with the print statement. So if we print("\n") Python
15# automattically generates a newline because of the print statement and then
16# it prints a newline which gives us two blank lines. So print("\n") therefore,
17# gives you two blank lines.
18
19# If you have to print a blank single newline you have to use print() or
20# print("") What this blank print statement does is Python automatically
21# generates a newline because of the print statement and then you print
22# nothing. So print() or print("") gives you a blank single new line.