Probably not, but the convention is that periods and commas always stay within the quotes, whether the period or comma is a part of the quote or not. (This differs from what one expects from writing code.) When using question marks though, the placement does depend on whether the question mark is a part of the quote.
Edit: When I was younger, I also didn't know this and would place all punctuation marks according to whether it is a part of the quote. In fact, in my native language that is what you're supposed to do. To this day I still dislike this convention in English.
Edit 2: I know that this is an American English thing.
(This differs from what one expects from writing code.)
I learned syntactic analysis at the same time as I learned to write code, and that convention always looked to me like made up by someone who learned none. "Ego dixi".¹
Is the period part of the quote?
Probably not, but the convention is that periods and commas always stay within the quotes, whether the period or comma is a part of the quote or not. (This differs from what one expects from writing code.) When using question marks though, the placement does depend on whether the question mark is a part of the quote.
Edit: When I was younger, I also didn't know this and would place all punctuation marks according to whether it is a part of the quote. In fact, in my native language that is what you're supposed to do. To this day I still dislike this convention in English.
Edit 2: I know that this is an American English thing.
If I remember correctly, this is a US thing. We were taught to place punctuation depending on whether they are part of the quote. So
I was reading 'War and Peace'.
but
She asked me 'Tea or coffee?'
Fuck convention when it doesn't make sense, though. I'm gonna put stuff that's part of the quote within the quotes and nothing else.
Learning programming before higher level English has created a strong distaste for that convention.
I also hate this convention tbh. Doesn't really make sense.
I learned syntactic analysis at the same time as I learned to write code, and that convention always looked to me like made up by someone who learned none. "Ego dixi".¹
¹Psalmus 40:5
Don't those writing conventions and rules differ from region to region?
It's a US thing.