Hello, I am new to learning Python, and right away it seemed like the str() command is useless. As far as I understand it turns a variable into a string so that you can successfully combine a string and a variable when using the print command. If this is true, then why would you not simply put:
print 'The value of pi is approximately equal to ’ + ‘3.14’ instead of print … + str(3.14)
also why could you not just change it to: print ‘The value of pi is approximately equal to 3.14’
Basically I am asking why you would ever use this command and why you would combine strings with a + when you could just write it all in one string.
Thanks for any responses!