0

(Python 3) Quotations are confusing me

(beginner) i was given the problem >>>word: input("Enter a word: ") Enter a word: cheese >>>print: (word + ' shop') so i thought the answer was 'cheese shop' but the answer was cheese shop i don't understand, how is that the answer? how are the answers different?

22nd Apr 2018, 8:30 PM
Lightly Salted7
2 Antworten
+ 3
When we write print("something") or print('something') in Python what we are saying is print what is between the quotation marks so it will just print something with no quotion marks in both cases
22nd Apr 2018, 8:48 PM
cyk
cyk - avatar
+ 2
Python doesn’t print the words with the quotes. They’re removed when it’s printed
22nd Apr 2018, 8:38 PM
Ariela
Ariela - avatar