As we had learned about PYTHON today, I wanna share some information that I get and I read . Do you know that we can make Python more interesting???
Before that, one of the main design goals of Python that i want to share is readability.
-PYTHON-
Why Python?
Python syntax differs from more common C and Java syntax in several respects:
- Curly braces aren't used to denote block statements. Instead indentation is used.
- Line breaks are used to denote the end of a statement, as opposed to a semi-colon.
- Python has only two forms of looping. A for loop (Syntax: for item in iterator:) and a while loop (Syntax: while expression: )
Fun Facts about Python?
- Python uses indentation to denote block statements rather than the common convention of curly braces ({ }). Similarly, ends of statements are denoted by a new line rather than a semi-colon.
- Web pages written in Python have the .py file extension rather than the .html extension.
- Jython is an implementation of Python written in Java. In Jython, any Java class can be imported and used. Additional Python interpreters written in other languages include: IronPython and Boo (.NET/Mono), and PyPy (the Python language written in Python rather than C).
- Strings in Python are immutable meaning any operation performed on a string does not change the original string, but returns an entirely new string. Fans of Python say that this is an advantage because it eliminates the chance that strings used in one part of the program will be modified unexpectedly by another part of the program (our book describes this situation as a 'side-effect').
**Python is easy to learn**
No comments:
Post a Comment