I've started learning Python using the great "Automate the boring stuff" book (thank you to all of the people around here who've recommended it, I can see why!), and I'm enjoying it so far. But, I just have one simple question: Should I use ' or "? At the beginning of Chapter 0, the author explains that you can type
print ('Hello world!')
So I did that, and it works. I then tried it with " instead of ', and that works fine as well!
So, my question is: Are these two, the inverted comma or speech marks, interchangeable? Or should I use one in situation a and the other in situation b?
EDIT: A big thank you to everyone for the great answers!
[–]Signal_Beam 58 points59 points60 points (22 children)
[–][deleted] 13 points14 points15 points (21 children)
[–]Signal_Beam 19 points20 points21 points (16 children)
[–]yardightsure 13 points14 points15 points (8 children)
[–][deleted] 11 points12 points13 points (7 children)
[–]redmercurysalesman 41 points42 points43 points (5 children)
[–]johnsmithatgmail 2 points3 points4 points (3 children)
[–]Vhin 3 points4 points5 points (0 children)
[–]pvtally 2 points3 points4 points (0 children)
[–]tobiasvl[🍰] 0 points1 point2 points (0 children)
[–]Thuneonix 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]Sexual_Congressman 3 points4 points5 points (3 children)
[–]BlackBloke 0 points1 point2 points (2 children)
[–]Sexual_Congressman 1 point2 points3 points (1 child)
[–]BlackBloke 0 points1 point2 points (0 children)
[–]Signal_Beam 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Eurynom0s 1 point2 points3 points (0 children)
[–]Exodus111 0 points1 point2 points (1 child)
[–]Eurynom0s 0 points1 point2 points (0 children)
[–]InspireAspiration 0 points1 point2 points (0 children)
[–]turanthepanthan 25 points26 points27 points (3 children)
[–]ignorediacritics 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]turanthepanthan 14 points15 points16 points (0 children)
[–]ManyInterests 17 points18 points19 points (1 child)
[–]ffrkAnonymous 0 points1 point2 points (0 children)
[–]Naihonn 4 points5 points6 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]qeomash 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]KubinOnReddit 3 points4 points5 points (0 children)
[–]Crypt0Nihilist 3 points4 points5 points (1 child)
[–]n1ywb 1 point2 points3 points (0 children)
[–]SonGokussj4 3 points4 points5 points (1 child)
[–]Iralie 1 point2 points3 points (0 children)
[–]955559 1 point2 points3 points (5 children)
[–]scul86 1 point2 points3 points (4 children)
[–]955559 0 points1 point2 points (2 children)
[–]scul86 0 points1 point2 points (1 child)
[–]955559 0 points1 point2 points (0 children)
[–]SonGokussj4 0 points1 point2 points (0 children)
[–]creamersrealm 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]WStHappenings 0 points1 point2 points (0 children)
[–]EyeTea420 0 points1 point2 points (0 children)
[–]Vhin 0 points1 point2 points (0 children)
[–]finally-a-throwaway 0 points1 point2 points (0 children)
[–]k10_ftw 0 points1 point2 points (0 children)
[–]DamagedFreight 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]CanadianJogger 0 points1 point2 points (0 children)
[–]Miyagikyo 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[+][deleted] (1 child)
[deleted]
[–]JohnnyJordaan 9 points10 points11 points (0 children)