Python Syntax
Python Syntax
In [ ]:
#print("Hello, World!")
print("Good Morning")
In [ ]:
#This is a comment
#written in
#more than just one line
print("Hello, World!")
print(a)
b = 19;
print(b)
print(name)
Indentation in Python
Indentation means white spaces are used to delimit a block.Python uses a combination of colon (:) and indentation to indicate a block
In [ ]:
if 5>2:
In [3]:
if 5>2:#proper spacing is not given.o it throws error
^
IndentationError: expected an indented block
Python is casesensitive
It means it treats Uppercase and lowercase differently
In [2]:
print("Hello World")
Hello World
---------------------------------------------------------------------------
~\AppData\Local\Temp/ipykernel_29820/3335447303.py in <module>
1 print("Hello World")
----> 2 Print("hello")
In [ ]: