Why Can't I Print a Variable?


#1

todays_date = “March 31, 2023”
print (“todays_date”)
it’s just printing same. “todays_date”
why it’s not printing. “March 31, 2023”


FAQ: Learn Python - Python Syntax - Variables
#2

Hi @byteninja09785,

Quotes are only used when working with strings. To print the value of the todays_date variable, you need to remove the quotes from around it so the interpreter knows you don’t want to print todays_date literally, but the value of the variable by that name.