There is NO multi-line comment in Python?! (C/C++/Java supports multi-line comments via /*. Comments are ignored by the Python Interpreter, but they are critical in providing explanation and documentation for others (and yourself three days later) to read your program. Python Basic Syntaxes EOL CommentĪ Python comment begins with a hash sign ( #) and last till the end of the current line (EOL). Python documentation and language reference are provided online. To check the version of your Python, issue this command: Use Python 2 only for maintaining legacy projects. Python 3.0 was released in 2008, while Python 2.7 in 2010.ĪGAIN, TAKE NOTE THAT PYTHON 2 AND PYTHON 3 ARE NOT COMPATIBLE!!! You need to decide whether to use Python 2 or Python 3. He decided to start a new version called Python 3, but continue to maintain the old Python 2 without introducing new features. This situation arises because when Guido Van Rossum (the creator of Python) decided to bring significant changes to Python 2, he found that the new changes would be incompatible with the existing codes. Python 3 is NOT backward compatible with Python 2.Ĭurrently, two versions of Python are supported in parallel, version 2 and version 3. Python 3 (Python 3000 or p圓k): A major upgrade released in 2008.Python 2: released in 2000, with many new features such as garbage collector and support for Unicode.Python comes with a huge set of libraries including graphical user interface (GUI) toolkit, web programming library, networking, and etc.Hence, Python is not as fast as fully-compiled languages such as C/C++. It is compiled into internal bytecodes, which is then interpreted. Python is not a fully compiled language.Python provides high-level data types such as dynamic array and dictionary (or associative array).You do not need to allocate and free memory in your programs. Python provides automatic memory management.That is, a variable can be assigned a value of any type, a list (array) can contain objects of different types. Like most of the scripting languages (e.g., Perl, JavaScript), Python associates types with objects, instead of variables. Python is a scripting language and dynamically typed.Python can be used to write small applications and rapid prototypes, but it also scales well for developing large-scale project. ![]() You can code an application in Python in much shorter time than other general-purpose languages (such as C/C++/Java).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |