SlideShare a Scribd company logo
1 of 7
An Adventure of Mr. Python

                     M. Kubo
Mr. Python is too lazy.
His room is always a mess.
He asked to the God of Python.
“How can I tide up my toys?”
The God replied from the heaven.
“Use the list. The charm is “Abracadabra [ ].”
Mr. Python said “L=[ ].”
What a miracle! Some boxes were fallen from the heaven.
The God said. “Tide up the toys using these boxes.”
OK. Everything is packed into the list.
To pick up “Teddy”, just say “L[3].”
To sort the toys in alphabetical order, just say “L.sort().”

Note that L is a list object and sort() is a function defined
in the object called “method.”
Mr. Python is impatient, too. He complained to the Go
“I’d like to pick my toys immediately.”
The God replied from the heaven again.
“Use the dictionary. The charm is “Abracadabra {}.”
Using lists and dictionaries, Mr. Python could manage his
efficiently and lived happily ever after.

More Related Content

Viewers also liked

ピカチュウによるPythonオブジェクト入門
ピカチュウによるPythonオブジェクト入門ピカチュウによるPythonオブジェクト入門
ピカチュウによるPythonオブジェクト入門Mikio Kubo
 
シグナルとノイズ
シグナルとノイズシグナルとノイズ
シグナルとノイズKohki Obata
 
Python Imaging Libraryの紹介
Python Imaging Libraryの紹介Python Imaging Libraryの紹介
Python Imaging Libraryの紹介K Moneto
 
ImageJプラグインの作成:序論
ImageJプラグインの作成:序論ImageJプラグインの作成:序論
ImageJプラグインの作成:序論nmaro
 
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう![RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!Rakuten Group, Inc.
 
Positron Emission Tomography
Positron Emission TomographyPositron Emission Tomography
Positron Emission TomographyAhmad Bader
 
PET-CT Scan(Principles and Basics)
PET-CT Scan(Principles and Basics)PET-CT Scan(Principles and Basics)
PET-CT Scan(Principles and Basics)abdulkader helwan
 
Pet presentation, positron emission tomography
Pet presentation, positron emission tomography Pet presentation, positron emission tomography
Pet presentation, positron emission tomography emicica
 
Principles and application of PET CT & PET MR
Principles and application of PET CT & PET MRPrinciples and application of PET CT & PET MR
Principles and application of PET CT & PET MRcharusmita chaudhary
 
ピカチュウによるPythonオブジェクト入門2
ピカチュウによるPythonオブジェクト入門2ピカチュウによるPythonオブジェクト入門2
ピカチュウによるPythonオブジェクト入門2Mikio Kubo
 

Viewers also liked (14)

ピカチュウによるPythonオブジェクト入門
ピカチュウによるPythonオブジェクト入門ピカチュウによるPythonオブジェクト入門
ピカチュウによるPythonオブジェクト入門
 
Hl20160929
Hl20160929Hl20160929
Hl20160929
 
Why python
Why pythonWhy python
Why python
 
シグナルとノイズ
シグナルとノイズシグナルとノイズ
シグナルとノイズ
 
Python Imaging Libraryの紹介
Python Imaging Libraryの紹介Python Imaging Libraryの紹介
Python Imaging Libraryの紹介
 
ImageJプラグインの作成:序論
ImageJプラグインの作成:序論ImageJプラグインの作成:序論
ImageJプラグインの作成:序論
 
Rubricas
RubricasRubricas
Rubricas
 
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう![RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!
[RakutenTechConf2013] [C-0] 日本にいたまま英語ペラペラ化!来年は海外カンファレンスでしゃべろう!
 
Positron Emission Tomography
Positron Emission TomographyPositron Emission Tomography
Positron Emission Tomography
 
PET-CT Scan(Principles and Basics)
PET-CT Scan(Principles and Basics)PET-CT Scan(Principles and Basics)
PET-CT Scan(Principles and Basics)
 
Pet presentation, positron emission tomography
Pet presentation, positron emission tomography Pet presentation, positron emission tomography
Pet presentation, positron emission tomography
 
Principles and application of PET CT & PET MR
Principles and application of PET CT & PET MRPrinciples and application of PET CT & PET MR
Principles and application of PET CT & PET MR
 
PET CT
PET CTPET CT
PET CT
 
ピカチュウによるPythonオブジェクト入門2
ピカチュウによるPythonオブジェクト入門2ピカチュウによるPythonオブジェクト入門2
ピカチュウによるPythonオブジェクト入門2
 

More from Mikio Kubo

ここが変だよ人道支援ロジスティクス
ここが変だよ人道支援ロジスティクスここが変だよ人道支援ロジスティクス
ここが変だよ人道支援ロジスティクスMikio Kubo
 
サプライ・チェイン・アナリストになるために
サプライ・チェイン・アナリストになるためにサプライ・チェイン・アナリストになるために
サプライ・チェイン・アナリストになるためにMikio Kubo
 
Or seminar2011final
Or seminar2011finalOr seminar2011final
Or seminar2011finalMikio Kubo
 
4章在庫の数理
4章在庫の数理4章在庫の数理
4章在庫の数理Mikio Kubo
 

More from Mikio Kubo (8)

ここが変だよ人道支援ロジスティクス
ここが変だよ人道支援ロジスティクスここが変だよ人道支援ロジスティクス
ここが変だよ人道支援ロジスティクス
 
サプライ・チェイン・アナリストになるために
サプライ・チェイン・アナリストになるためにサプライ・チェイン・アナリストになるために
サプライ・チェイン・アナリストになるために
 
Python opt
Python optPython opt
Python opt
 
Or seminar2011final
Or seminar2011finalOr seminar2011final
Or seminar2011final
 
Scmbook5 e
Scmbook5 eScmbook5 e
Scmbook5 e
 
4章在庫の数理
4章在庫の数理4章在庫の数理
4章在庫の数理
 
Current trend
Current trendCurrent trend
Current trend
 
Gurobi python
Gurobi pythonGurobi python
Gurobi python
 

Python ehon1

  • 1. An Adventure of Mr. Python M. Kubo
  • 2. Mr. Python is too lazy. His room is always a mess. He asked to the God of Python. “How can I tide up my toys?”
  • 3. The God replied from the heaven. “Use the list. The charm is “Abracadabra [ ].” Mr. Python said “L=[ ].” What a miracle! Some boxes were fallen from the heaven. The God said. “Tide up the toys using these boxes.”
  • 4. OK. Everything is packed into the list. To pick up “Teddy”, just say “L[3].”
  • 5. To sort the toys in alphabetical order, just say “L.sort().” Note that L is a list object and sort() is a function defined in the object called “method.”
  • 6. Mr. Python is impatient, too. He complained to the Go “I’d like to pick my toys immediately.” The God replied from the heaven again. “Use the dictionary. The charm is “Abracadabra {}.”
  • 7. Using lists and dictionaries, Mr. Python could manage his efficiently and lived happily ever after.