Python is a popular high-level programming language known for its simplicity, readability, and versatility. It was created by Guido van Rossum and first released in 1991.
It is used for:
- artificial intelligence
- big data
- web development (server-side)
- software development
- mathematics
- system scripting
First Python Program
print("Hello, World!")
print("Python")
print("Data Science")
print("Machine Learning")
Python Comments
Comments can be used to explain Python code. Comments can be used to make the code more readable.
Single Line CommentComments start with a #, and Python will render the rest of the line as a comment:
print("Hello") #This is a comment
Multiline Comment
Python will ignore string literals that are not assigned to a variable, you can add a multiline string (triple quotes) in your code, and place your comment inside it:
'''
print("Python")
print("Data Science")
print("Machine Learning")
print("Deep Learnig")
'''
print("Artificial Intelligence")
Python Variables
Variables are containers for storing data values.
Assign Value to a variable
a=10
b=3.134
c="Machine Learning"
print(a)
print(b)
print(c)
10
3.134
Machine Learning