Indentation are the spaces at the beginning of a python code line.
tip: In other programming languages, spaces before code line is for readability only
if 6 > 3: dd print("Six is greater than Three!")
if you skip the indentation, Python will show you an error:
if 6 > 3: print("Six is greater than Three!")
tip: Use atleast 1 space, but you can use more.
tip: You should use the same number of spaces in the same code block, or Python will give you an error.
tip: A Python program is read by a parser. Originally Python was designed to be very readable language
Check out our Python comments lesson.
In Python variables are created when you assign a value to it:
x = 8
y = "Free code wiki!
learn Python courses and many other Coding lessons for free , our main goal is to allow students to learn Python and other online Programming courses in one place for free.