Now Python3 (Other)

Introduction

Describe the grammar other than the basic control structure and data structure as Python 3 for yourself. Emphasis on practicality over accuracy. (This is a page for me who mainly uses Java and .NET to use Python)

The control structure is Now Python3 (Control Structure) The data structure is Now Python3 (Data Structure)

module

import statement

(1)import module name as alias
(2)from module name import definition name as alias,Definition name as alias
* Definition names include class names, function names, variable names, etc.

import example


import math as m
from math import pi

print( m.pi )
print( pi )

In (1), import the module and use it with module name.definition name. (2) imports the defined name in the module and uses it as the defined name. (It is convenient when importing a class because it can be accessed only by the definition name without writing the module name) When importing a module in a package that organizes modules in a hierarchical structure, you can specify the module name as package name.subpackage name.module name.

Recommended Posts

Now Python3 (Other)
Python
[Python] Now a brown coder ~ [AtCoder]
kafka python
Python basics ⑤
python + lottery 6
Python Summary
Built-in python
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
python tips
python function ①
Python basics
Python memo
ufo-> python (3)
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
Socket communication using socketserver with python now
python tips
Installing Python 3.4.3.
Try python
Python iterative
Python algorithm
Python2 + word2vec
[Python] Variables
Python functions
Python sys.intern ()
Python tutorial
Python decimals
python underscore
Python summary
Start python
[Python] Sort
Note: Python
Python basics ③
python log
Python basics
[Scraping] Python scraping
Python update (2.6-> 2.7)
python memo
Python memorandum
Python # sort
ufo-> python
Python nslookup
python learning
Hannari Python 2020
[Rpmbuild] Python 3.7.3.
Prorate Python (1)
python memorandum
Download python
python memorandum