python 3.x - Strings inside of comments -


i noticed when place quotations around in comment line, words in quotations change color indicate interpreter sees them string. found confusing because thought interpreter supposed ignore comments. curious know if did wrong. code below.

# output of concatenation above be: # 'spameggs' 

'spameggs' changes color though part of comment line.

its showing me comment ,no change of color of text mentioning,which editor using .seems editor problem.try open in idle.it red color.

thanks


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -