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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -