Nayan Jyoti Das
last year
Nayancountry asked

What if after writing a text inside the quotation marks we use full-stop or any other marks, does it affect the code?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Good question! The punctuation you add to a string, like a full-stop (period) or other marks, doesn’t affect the code itself, but it will change the actual content of the string.

For example, if you write:

print("This is a string.")

the output will include the period, showing: This is a string. However, if you write:

print("This is a string")

then the output will be This is a string without the period. The choice of punctuation is up to you and what you want to convey in that string.

Let me know if you have more questions!

Python
This question was asked as part of the Getting started with Python course.