AlanW Posted June 14, 2016 Share Posted June 14, 2016 Hi, in the attached pic the print(a) works as does print a Should you always put () around in this instance and why. Thanks Quote Link to comment
MullinRJ Posted June 15, 2016 Share Posted June 15, 2016 Alan, I know very little about Python, but I do know that "print" requires parentheses in Python 3.x. Since you assert it works both ways in your environment, I'd surmise you're running Python 2.x. Based on that, if you use print with parentheses, your "print()" routines should work in both Python 2.x and 3.x environments. If you're only going to work in Python 2.x then you can use whichever form you like. HTH, Raymond Quote Link to comment
AlanW Posted June 15, 2016 Author Share Posted June 15, 2016 Thanks, Yes this free app is 2.7. When I get back home on computer will use the latest 3.x. Can anyone recommend any free app for an iPad? Or maybe I even one I can buy for learning on the move? Thanks Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.