Printing In Python (Easy Enough For Everyone)

Well, everyone who needs to use python, does not matter if you are a professional or a beginner, you need to know how to print out stuff in your console. This is actually also amazing for debugging a game which you might be making. Such as the movement of character can be printed, and if the console shows a error of some sort, you immediately know what the problem is! So easy and useful! Let's see how to use this function now.

All you have to do is:

  1.  Write with brackets: print()
  2.  If you are going to print a string, add quotation marks inside the bracket: print("")
  3.  Add your letters/words inside the quotation marks: print("using the print function in python")

Although, to add a variable, you just have to add the name of the variable inside the brackets and there should not be any quotation marks present (check the following example):

  1.  Creating a variable which is a string: var = "Variable"
  2.  Printing it: print(var)

This will show Variable in the console and note how there are no quotation marks.

Also, for further reference, check the following code answer (there is also one on google if you search 'how to print in python'):

This was it for now. Also, this is my first writeup so help me make it better! Thank you! And as always, hope this helped!


Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.