DEV Community

loading...

Python Syntax

TimothyAgevi
・1 min read

1 .When writing functions

  • Just as other programming languages python uses parenthesis (),when declaring functions. However instead of using curly brackets{ }to to embed its code,it uses indentation below is an example:

def greeting():
return hello World!

2. Commenting Out code
-use # for single line comments
-Use triple quotes for multiple line comments

Discussion (0)