-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogtam_34.py
24 lines (15 loc) · 908 Bytes
/
progtam_34.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This is program 34
""" The difference between plus and comma in a print statement in Python is that
the plus sign will concatenate the strings together,
while the comma will print the strings separated by a space.
For example, the following code will print the two strings "Hello" and "World" on separate lines:"""
print("Hello")
print("World")
# The following code will print the two strings "Hello" and "World" on the same line, with a space in between:
print("Hello", "World")
# The following code will print the two strings "Hello" and "World" on the same line, with no space in between:
print("Hello" + "World")
# The comma can also be used to print multiple values of different types.
# For example, the following code will print the number 1, the string "two", and the boolean value True:
print(1, "two", True)
# The plus sign cannot be used to print multiple values of different types.