What I was addicted to when migrating Processing users to Python

It's a memo for myself, so don't swallow it.

1. The for statement is unique to Python


for i in range(0,10):
	print i

** Apparently Python3 and Python2 are a little different ** 2015/06/20 Updated at 9:53 pm

** Python 2 series ** Make a list from mini to max with range (mini, max) The list is like an array. The for statement is executed for the number in the list. You can make a list from 10 to 1 with range (max, min, -1).

** Python3 series ** For Python3 series, list (range (0,10)) may be better. The for statement works, but the explanation of creating a list may not fit.


for(int i = 0;i < 10;i++){
	println(i);
}

2. How to create variables

num1 = 10
num2 = [10,20,30]
#↓ Python2 system that can be used with this
num2 = range(10,30,10)
#↓ For Python 3 series
num2 = list(range(10,30,10))

int num1 = 10;
int[] num2 = {10,20,30}

For the time being, I may update again so far

Recommended Posts

What I was addicted to when migrating Processing users to Python
What I was addicted to when using Python tornado
What I was addicted to Python autorun
What I was addicted to with json.dumps in Python base64 encoding
What I did when updating from Python 2.6 to 2.7
A story I was addicted to when inserting from Python to a PostgreSQL table
I was addicted to scraping with Selenium (+ Python) in 2020
What I was addicted to when creating a web application in a windows environment
Three things I was addicted to when using Python and MySQL with Docker
A note I was addicted to when running Python with Visual Studio Code
A story that I was addicted to when I made SFTP communication with python
What I was addicted to when combining class inheritance and Joint Table Inheritance in SQLAlchemy
I was addicted to multiprocessing + psycopg2
[Fixed] I was addicted to alphanumeric judgment of Python strings
What I was addicted to when dealing with huge files in a Linux 32bit environment
The record I was addicted to when putting MeCab on Heroku
A note I was addicted to when making a beep on Linux
A note I was addicted to when creating a table with SQLAlchemy
What I did when I wanted to make Python faster -Numba edition-
I was addicted to confusing class variables and instance variables in Python
What I referred to when studying tkinter
I was addicted to pip install mysqlclient
I was addicted to Flask on dotCloud
What I did to save Python memory
When I tried to scrape using requests in python, I was addicted to SSLError, so a workaround memo
When I tried to run Python, it was skipped to the Microsoft Store
Use Python from Java with Jython. I was also addicted to it.
The file name was bad in Python and I was addicted to import
[Python] I was addicted to not saving internal variables of lambda expressions
[Python] When I tried to make a decompression tool with a zip file I just knew, I was addicted to sys.exit ()
[Python] What I did to do Unit Test
[Introduction to json] No, I was addicted to it. .. .. ♬
I was able to recurse in Python: lambda
[Question] What happens when I use% in python?
Summary of points I was addicted to running Selenium on AWS Lambda (python)
What I do when imitating embedded go in python
A story that I was addicted to at np.where
What to do when "cannot import name xxx" [Python]
Things to keep in mind when processing strings in Python2
I was able to repeat it in Python: lambda
I was addicted to trying logging.getLogger in Flask 1.1.x
Things to keep in mind when processing strings in Python3
I want to do something in Python when I finish
What to do when you can't bind CaboCha to Python
I was soberly addicted to calling awscli from a Python 2.7 script registered in crontab
What I did when I was angry to put it in with the enable-shared option
What I was careful about when implementing Airflow with docker-compose
[Go language] Be careful when creating a server with mux + cors + alice. Especially about what I was addicted to around CORS.
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
When creating a pipenv environment, I got addicted to "Value Error: Not a valid python path"
I was surprised to receive a nice review when I wrote Python to CheckIO and its explanation
What I did to welcome the Python2 EOL with confidence
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python
Memo (March 2020) that I was addicted to when installing Arch Linux on MacBook Air 11'Early 2015
What I was asked when using Random Forest in practice
What I learned in Python
What I was worried about when displaying images with matplotlib
The story I was addicted to when I specified nil as a function argument in Go
[Python3] List of sites that I referred to when I started Python
What I was addicted to when I built my own neural network using the weights and biases I got with scikit-learn's MLP Classifier.
I was a little addicted to installing Python3.3 + mod_wsgi3.4 on Sakura VPS (CentOS), so a retrospective memo