Difference between printing strings and variables


#1

What is the difference between printing strings and printing variables? They look the same to me. Or am I missing something? Thank you! :slight_smile:


#2

if your variable contains a string, then yes. But lets say you want to prompt the user for input:

raw_input("give me a string: ")

its useful to store the result in variable:

x = raw_input("give me a string: ")

so you have access to the string the user entered

variable can contain also contain many other data


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.