Python points from the perspective of a C programmer

I've only come to C languages such as C, C ++, and C #, but I decided to study machine learning, which is popular now, and studied Python. List the characteristic points seen from the C language programmer.

Syntax features

Literal features

It is suitable for numerical calculation as a whole because it has no limit on the number of digits and has an imaginary number. On the other hand, it is not suitable for embedded environments where memory usage is unreadable and memory is cheap. (Well, why not use it for that purpose ...)

Primitive type features

A great variety of primitive types. What is implemented in the object type of the standard library in Java and C language is implemented in the primitive type in Python. Primitive types have advantages such as a smaller amount of code than object types and a cleaner appearance. On the other hand, there is a disadvantage that it is troublesome until you learn how to write primitive types.

Control syntax features

Rich in simple sentences. Is the compound statement equivalent to Java?

Summary

In the case of C language and Java, the policy was to provide only basic functions in the language type system, and to provide convenient object types and methods in the standard library. Python, on the other hand, packed the language's type system with as many useful features as possible to improve productivity.

Productivity has improved, but compatibility is a concern. It seems that Python3 is basically not backward compatible with Python2, but I don't want Python4? To have the same thing ...

Recommended Posts

Python points from the perspective of a C programmer
Different from the import type of python. from A import B meaning
Learning notes from the beginning of Python 1
[Python] Get the update date of a news article from HTML
[python] [meta] Is the type of python a type?
The story of blackjack A processing (python)
Learning notes from the beginning of Python 2
[AtCoder explanation] Control the A, B, C problems of ABC182 with Python!
Comparing R, Python, SAS, SPSS from the perspective of European data scientists
[AtCoder explanation] Control the A, B, C problems of ABC186 with Python!
[AtCoder explanation] Control the A, B, C problems of ABC185 with Python!
[AtCoder explanation] Control the A, B, C problems of ABC187 with Python!
From a book that makes the programmer's way of thinking interesting (Python)
[AtCoder explanation] Control the A, B, C problems of ABC184 with Python!
Run a Python script from a C # GUI application
Create a C array from a Python> Excel sheet
A Java programmer studied Python. (About the decorator)
Get the caller of a function in Python
A memorandum of calling Python from Common Lisp
Make a copy of the list in Python
A note about the python version of python virtualenv
Call a Python script from Embedded Python in C ++ / C ++
[Python] A rough understanding of the logging module
Output in the form of a python array
A discussion of the strengths and weaknesses of Python
Extension of Python by C or C ++ (when there are multiple arguments, when passing a list from the Python side)
[AtCoder explanation] Control the A, B, (C), D problems of ABC165 with Python!
[AtCoder explanation] Control the A, B, C, D problems of ABC183 with Python!
[AtCoder explanation] Control the A, B, C, D problems of ABC181 with Python!
The story of launching a Minecraft server from Discord
The wall of changing the Django service from Python 2.7 to Python 3
[Python] A program that counts the number of valleys
Calculate volume from the two-dimensional structure of a compound
Learn Nim with Python (from the beginning of the year).
Make a copy of a Google Drive file from Python
[Python] Get the text of the law from the e-GOV Law API
Cut a part of the string using a Python slice
Kaggle competition process from the perspective of score transitions
Study from the beginning of Python Hour1: Hello World
A python implementation of the Bayesian linear regression class
Get the return code of the Python script from bat
Make a breakpoint on the c layer with python
Tasks at the start of a new python project
Study from the beginning of Python Hour8: Using packages
A reminder about the implementation of recommendations in Python
[Python] A program that compares the positions of kangaroos.
[Python] How to call a c function from python (ctypes)
A little bit from Python using the Jenkins API
Python Note: The mystery of assigning a variable to a variable
Get the value of a specific key in a list from the dictionary type in the list with Python
[Python] Representing the number of complaints from life insurance companies in a bar graph
[Python / C] I made a device that wirelessly scrolls the screen of a PC remotely.
Towards the retirement of Python2
C / C ++ programmer challenges Python (class)
About the ease of Python
About the features of Python
The Power of Pandas: Python
AtCoder Beginner Contest 166 A Explanation of Problem "A? C" (Python3, C ++, Java)
Find out the apparent width of a string in python
A simple Python implementation of the k-nearest neighbor method (k-NN)
I just changed the sample source of Python a little.