The Python language syntax is almost the same as general programming languages like Java or PHP.
Basic Syntax
Below is an example of a Python function used for printing. In Python to print, simply use the print() function, where something to be printed must be placed between the opening and closing parentheses. Even in Python version 2.x you don't have to use curly braces, just separate with spaces.
If you want to print String data types directly, you must put them inside valid quotes first.
print("Hello World")
When you run the script above, you will see output in the form of text Hello World.
Python Case Sensitivity
Python is case sensitive, this means uppercase and lowercase letters make a difference. For example, if you use the print function with lowercase print() it will work. It is different if you use uppercase Print() or PRINT(), an error message will appear.
This rule applies to variable names or other functions.
Gabung Komunitas Developer & Kreator Digital
Dapatkan teman coding, sharing project, networking dengan expert, dan update teknologi terbaru.
Selamat! Anda telah sukses mendaftar di newsletter.