SlideShare a Scribd company logo
sys Variables                                     String Methods                                        Datetime Methods

                                                                                                         today()                       fromordinal(ordinal)
argv                     Command line args        capitalize() *              lstrip()
                                                                                                         now(timezoneinfo)             combine(date, time)
builtin_module_names Linked C modules             center(width)               partition(sep)
                                                                                                         utcnow()                      strptime(date, format)
byteorder                Native byte order                                    replace(old, new)
                                                  count(sub, start, end)
                                                                                                         fromtimestamp(timestamp)
check_interval           Signal check frequency   decode()                    rfind(sub, start ,end)
                                                                                                         utcfromtimestamp(timestamp)
exec_prefix              Root directory           encode()                    rindex(sub, start, end)
executable               Name of executable       endswith(sub)               rjust(width)
exitfunc                 Exit function name       expandtabs()                rpartition(sep)
                                                                                                        Time Methods
modules                  Loaded modules           find(sub, start, end) rsplit(sep)
                                                                                                         replace()                     utcoffset()
path                     Search path                                          rstrip()
                                                  index(sub, start, end)
                                                                                                         isoformat()                   dst()
platform                 Current platform         isalnum() *                 split(sep)
                                                                                                         __str__()                     tzname()
stdin, stdout, stderr    File objects for I/O     isalpha() *                 splitlines()
                                                                                                         strftime(format)
version_info             Python version info      isdigit() *                 startswith(sub)
winver                   Version number           islower() *                 strip()
                                                  isspace() *                 swapcase() *
                                                                                                        Date Formatting (strftime and strptime)
                                                  istitle() *                 title() *
sys.argv for $ python foo.py bar qux
                                                                                                        %a Abbreviated weekday (Sun)
                                                  isupper() *                 translate(table)
sys.argv[0]                                                                                             %A Weekday (Sunday)
                         foo.py                   join()                      upper() *
sys.argv[1]                                                                                             %b Abbreviated month name (Jan)
                         bar                      ljust(width)                zfill(width)
sys.argv[2]                                                                                             %B Month name (January)
                         qux                      lower() *
                                                                                                        %c Date and time
                                                                                                        %d Day (leading zeros) (01 to 31)
                                                                Methods marked * are locale
os Variables                                      Note          dependant for 8-bit strings.            %H 24 hour (leading zeros) (00 to 23)
                         Alternative sep
altsep                                                                                                  %I 12 hour (leading zeros) (01 to 12)
                         Current dir string
curdir                                                                                                  %j      Day of year (001 to 366)
                                                  List Methods
                         Default search path
defpath                                                                                                 %m Month (01 to 12)
                         Path of null device
devnull                                                                                                 %M Minute (00 to 59)
                                                  append(item)               pop(position)
                         Extension separator
extsep                                                                                                  %p AM or PM
                                                  count(item)                remove(item)
                         Line separator
linesep                                                                                                 %S Second (00 to 61 4)
                                                  extend(list)               reverse()
                         Name of OS
name                                                                                                    %U Week number                (00 to 53)
                                                  index(item)                sort()                                               1


                         Parent dir string
pardir                                                                                                  %w Weekday             (0 to 6)
                                                  insert(position, item)                                                   2


                         Patch separator
pathsep                                                                                                 %W Week number                (00 to 53)
                                                                                                                                  3


                         Path separator
sep                                                                                                     %x Date
                                                  File Methods
                                                                                                        %X Time
                                                                                                        %y Year without century (00 to 99)
                                                  close()                    readlines(size)
           Registered OS names: “posix”, “nt”,
Note       “mac”, “os2”, “ce”, “java”, “riscos”                                                         %Y Year (2008)
                                                  flush()                    seek(offset)
                                                                                                        %Z Time zone (GMT)
                                                  fileno()                   tell()
                                                                                                        %% A literal quot;%quot; character (%)
                                                  isatty()                   truncate(size)
Class Special Methods
                                                  next()                     write(string)
                                                                                                         1.
                                                  read(size)                 writelines(list)                   Sunday as start of week. All days in a
__new__(cls)             __lt__(self, other)
                                                  readline(size)                                                new year preceding the first Sunday
__init__(self, args)     __le__(self, other)
                                                                                                                are considered to be in week 0.
__del__(self)            __gt__(self, other)
__repr__(self)           __ge__(self, other)      Indexes and Slices (of a=[0,1,2,3,4,5])
                                                                                                         2.     0 is Sunday, 6 is Saturday.
__str__(self)            __eq__(self, other)
                                                  len(a)                       6
__cmp__(self, other) __ne__(self, other)
                                                  a[0]                                                   3.
                                                                               0                                Monday as start of week. All days in a
__index__(self)          __nonzero__(self)
                                                  a[5]                         5                                new year preceding the first Monday
__hash__(self)
                                                  a[-1]                        5                                are considered to be in week 0.
__getattr__(self, name)
                                                  a[-2]                        4
__getattribute__(self, name)
                                                  a[1:]                                                  4.
                                                                               [1,2,3,4,5]                      This is not a mistake. Range takes
__setattr__(self, name, attr)
                                                  a[:5]                        [0,1,2,3,4]                      account of leap and double-leap
__delattr__(self, name)
                                                  a[:-2]                       [0,1,2,3]                        seconds.
__call__(self, args, kwargs)
                                                  a[1:3]                       [1,2]
                                                  a[1:-1]                      [1,2,3,4]
                                                                                                              Available free from AddedBytes.com
                                                  b=a[:]                       Shallow copy of a

More Related Content

What's hot

Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
DevaKumari Vijay
 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet
Dr. Volkan OBAN
 
Cours langage c
Cours langage cCours langage c
Cours langage c
coursuniv
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
amiable_indian
 
Tableur avance EXCEL
Tableur avance EXCELTableur avance EXCEL
Tableur avance EXCELwalid sassi
 
Python programming workshop session 1
Python programming workshop session 1Python programming workshop session 1
Python programming workshop session 1
Abdul Haseeb
 
Lecture 4 variables data types and operators
Lecture 4  variables data types and operatorsLecture 4  variables data types and operators
Lecture 4 variables data types and operators
alvin567
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
H2Kinfosys
 
Python matplotlib cheat_sheet
Python matplotlib cheat_sheetPython matplotlib cheat_sheet
Python matplotlib cheat_sheet
Nishant Upadhyay
 
CLTL python course: Object Oriented Programming (1/3)
CLTL python course: Object Oriented Programming (1/3)CLTL python course: Object Oriented Programming (1/3)
CLTL python course: Object Oriented Programming (1/3)
Rubén Izquierdo Beviá
 
La programmation modulaire en Python
La programmation modulaire en PythonLa programmation modulaire en Python
La programmation modulaire en Python
ABDESSELAM ARROU
 
SQL Stored Procedures For My Library Project
SQL Stored Procedures For My Library ProjectSQL Stored Procedures For My Library Project
SQL Stored Procedures For My Library Project
Rick Massouh
 
Python oop class 1
Python oop   class 1Python oop   class 1
Python oop class 1
Aleksander Fabijan
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python Pandas
Neeru Mittal
 
Lecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With PythonLecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With Python
National College of Business Administration & Economics ( NCBA&E)
 
Introduction to numpy Session 1
Introduction to numpy Session 1Introduction to numpy Session 1
Introduction to numpy Session 1
Jatin Miglani
 
Logica Algoritmo 08 Recursividade
Logica Algoritmo 08 RecursividadeLogica Algoritmo 08 Recursividade
Logica Algoritmo 08 Recursividade
Regis Magalhães
 
Aula 01 - Introdução ao C++
Aula 01 - Introdução ao C++Aula 01 - Introdução ao C++
Aula 01 - Introdução ao C++
PeslPinguim
 
Python Advanced – Building on the foundation
Python Advanced – Building on the foundationPython Advanced – Building on the foundation
Python Advanced – Building on the foundation
Kevlin Henney
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Edureka!
 

What's hot (20)

Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet
 
Cours langage c
Cours langage cCours langage c
Cours langage c
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
 
Tableur avance EXCEL
Tableur avance EXCELTableur avance EXCEL
Tableur avance EXCEL
 
Python programming workshop session 1
Python programming workshop session 1Python programming workshop session 1
Python programming workshop session 1
 
Lecture 4 variables data types and operators
Lecture 4  variables data types and operatorsLecture 4  variables data types and operators
Lecture 4 variables data types and operators
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
 
Python matplotlib cheat_sheet
Python matplotlib cheat_sheetPython matplotlib cheat_sheet
Python matplotlib cheat_sheet
 
CLTL python course: Object Oriented Programming (1/3)
CLTL python course: Object Oriented Programming (1/3)CLTL python course: Object Oriented Programming (1/3)
CLTL python course: Object Oriented Programming (1/3)
 
La programmation modulaire en Python
La programmation modulaire en PythonLa programmation modulaire en Python
La programmation modulaire en Python
 
SQL Stored Procedures For My Library Project
SQL Stored Procedures For My Library ProjectSQL Stored Procedures For My Library Project
SQL Stored Procedures For My Library Project
 
Python oop class 1
Python oop   class 1Python oop   class 1
Python oop class 1
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python Pandas
 
Lecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With PythonLecture 01 - Basic Concept About OOP With Python
Lecture 01 - Basic Concept About OOP With Python
 
Introduction to numpy Session 1
Introduction to numpy Session 1Introduction to numpy Session 1
Introduction to numpy Session 1
 
Logica Algoritmo 08 Recursividade
Logica Algoritmo 08 RecursividadeLogica Algoritmo 08 Recursividade
Logica Algoritmo 08 Recursividade
 
Aula 01 - Introdução ao C++
Aula 01 - Introdução ao C++Aula 01 - Introdução ao C++
Aula 01 - Introdução ao C++
 
Python Advanced – Building on the foundation
Python Advanced – Building on the foundationPython Advanced – Building on the foundation
Python Advanced – Building on the foundation
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
 

Viewers also liked

Cooking Cake
Cooking CakeCooking Cake
Cooking Cake
Boite Witte
 
There Is No Place Like Home
There Is No Place Like HomeThere Is No Place Like Home
There Is No Place Like HomeBears Grl
 
Das GläSerne Kind
Das GläSerne KindDas GläSerne Kind
Das GläSerne Kindhoco85
 
Presentation2
Presentation2Presentation2
Presentation2Anna608
 
Amd Q308 Financials
Amd Q308 FinancialsAmd Q308 Financials
Amd Q308 Financials
earningsreport
 
JRMC Recomendation Letter
JRMC Recomendation LetterJRMC Recomendation Letter
JRMC Recomendation Letter
Craig Puccetti
 
ED Process Redesign
ED Process RedesignED Process Redesign
ED Process Redesign
Richard Winters
 
Eco Fashion Magazine Preview
Eco Fashion Magazine PreviewEco Fashion Magazine Preview
Eco Fashion Magazine Preview
distinctivestyle
 
Tp Traitement Hcv Du 2009
Tp Traitement Hcv Du 2009Tp Traitement Hcv Du 2009
Tp Traitement Hcv Du 2009
odeckmyn
 
De Poort Gaat Open
De Poort Gaat Open De Poort Gaat Open
De Poort Gaat Open
anne luchies
 
компьютерный колледж
компьютерный колледжкомпьютерный колледж
компьютерный колледжanytik
 
Summer HK trip
Summer HK tripSummer HK trip
Summer HK trip
solracious
 
SECR -2
SECR -2SECR -2
Buenos AñOs 60 Y 70
Buenos AñOs 60 Y 70Buenos AñOs 60 Y 70
Buenos AñOs 60 Y 70
Mireia Buchaca
 

Viewers also liked (16)

Cooking Cake
Cooking CakeCooking Cake
Cooking Cake
 
There Is No Place Like Home
There Is No Place Like HomeThere Is No Place Like Home
There Is No Place Like Home
 
ft Power Point
ft Power Pointft Power Point
ft Power Point
 
Das GläSerne Kind
Das GläSerne KindDas GläSerne Kind
Das GläSerne Kind
 
Presentation2
Presentation2Presentation2
Presentation2
 
Amd Q308 Financials
Amd Q308 FinancialsAmd Q308 Financials
Amd Q308 Financials
 
JRMC Recomendation Letter
JRMC Recomendation LetterJRMC Recomendation Letter
JRMC Recomendation Letter
 
ED Process Redesign
ED Process RedesignED Process Redesign
ED Process Redesign
 
Eco Fashion Magazine Preview
Eco Fashion Magazine PreviewEco Fashion Magazine Preview
Eco Fashion Magazine Preview
 
Tp Traitement Hcv Du 2009
Tp Traitement Hcv Du 2009Tp Traitement Hcv Du 2009
Tp Traitement Hcv Du 2009
 
De Poort Gaat Open
De Poort Gaat Open De Poort Gaat Open
De Poort Gaat Open
 
компьютерный колледж
компьютерный колледжкомпьютерный колледж
компьютерный колледж
 
Summer HK trip
Summer HK tripSummer HK trip
Summer HK trip
 
SECR -2
SECR -2SECR -2
SECR -2
 
Andrés Y Carlos
Andrés Y CarlosAndrés Y Carlos
Andrés Y Carlos
 
Buenos AñOs 60 Y 70
Buenos AñOs 60 Y 70Buenos AñOs 60 Y 70
Buenos AñOs 60 Y 70
 

Similar to python-cheat-sheet-v1

โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
Little Tukta Lita
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
Baishampayan Ghose
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
dudarev
 
ANSI C REFERENCE CARD
ANSI C REFERENCE CARDANSI C REFERENCE CARD
ANSI C REFERENCE CARD
Tia Ricci
 
Python 2.5 reference card (2009)
Python 2.5 reference card (2009)Python 2.5 reference card (2009)
Python 2.5 reference card (2009)
gekiaruj
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기
JangHyuk You
 
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐานภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
Noppanon YourJust'one
 
bpftrace - Tracing Summit 2018
bpftrace - Tracing Summit 2018bpftrace - Tracing Summit 2018
bpftrace - Tracing Summit 2018
AlastairRobertson9
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
Cloudera, Inc.
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
elliando dias
 
Python for R users
Python for R usersPython for R users
Python for R users
Satyarth Praveen
 
User-Defined Table Generating Functions
User-Defined Table Generating FunctionsUser-Defined Table Generating Functions
User-Defined Table Generating Functions
pauly1
 
PHP Cheat Sheet
PHP Cheat SheetPHP Cheat Sheet
PHP Cheat Sheet
GlowTouch
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
 
Arduino reference
Arduino   referenceArduino   reference
Arduino reference
Roberth Mamani Moya
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
PHP Cheatsheet
PHP CheatsheetPHP Cheatsheet
PHP Cheatsheet
Nuuktal Consulting
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
Chia-Chi Chang
 
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj TalkSpark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
Zalando Technology
 

Similar to python-cheat-sheet-v1 (20)

โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
 
ANSI C REFERENCE CARD
ANSI C REFERENCE CARDANSI C REFERENCE CARD
ANSI C REFERENCE CARD
 
Python 2.5 reference card (2009)
Python 2.5 reference card (2009)Python 2.5 reference card (2009)
Python 2.5 reference card (2009)
 
Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기Programming Lisp Clojure - 2장 : 클로저 둘러보기
Programming Lisp Clojure - 2장 : 클로저 둘러보기
 
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐานภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
 
bpftrace - Tracing Summit 2018
bpftrace - Tracing Summit 2018bpftrace - Tracing Summit 2018
bpftrace - Tracing Summit 2018
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Python for R users
Python for R usersPython for R users
Python for R users
 
User-Defined Table Generating Functions
User-Defined Table Generating FunctionsUser-Defined Table Generating Functions
User-Defined Table Generating Functions
 
PHP Cheat Sheet
PHP Cheat SheetPHP Cheat Sheet
PHP Cheat Sheet
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 
Arduino reference
Arduino   referenceArduino   reference
Arduino reference
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
PHP Cheatsheet
PHP CheatsheetPHP Cheatsheet
PHP Cheatsheet
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)Learning notes of r for python programmer (Temp1)
Learning notes of r for python programmer (Temp1)
 
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj TalkSpark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
Spark + Clojure for Topic Discovery - Zalando Tech Clojure/Conj Talk
 

More from Hiroshi Ono

Voltdb - wikipedia
Voltdb - wikipediaVoltdb - wikipedia
Voltdb - wikipediaHiroshi Ono
 
Gamecenter概説
Gamecenter概説Gamecenter概説
Gamecenter概説Hiroshi Ono
 
EventDrivenArchitecture
EventDrivenArchitectureEventDrivenArchitecture
EventDrivenArchitecture
Hiroshi Ono
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
Hiroshi Ono
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
Hiroshi Ono
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
Hiroshi Ono
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
Hiroshi Ono
 
downey08semaphores.pdf
downey08semaphores.pdfdowney08semaphores.pdf
downey08semaphores.pdf
Hiroshi Ono
 
BOF1-Scala02.pdf
BOF1-Scala02.pdfBOF1-Scala02.pdf
BOF1-Scala02.pdfHiroshi Ono
 
TwitterOct2008.pdf
TwitterOct2008.pdfTwitterOct2008.pdf
TwitterOct2008.pdf
Hiroshi Ono
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
Hiroshi Ono
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
Hiroshi Ono
 
SACSIS2009_TCP.pdf
SACSIS2009_TCP.pdfSACSIS2009_TCP.pdf
SACSIS2009_TCP.pdf
Hiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
Hiroshi Ono
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
Hiroshi Ono
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
Hiroshi Ono
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
Hiroshi Ono
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
Hiroshi Ono
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfHiroshi Ono
 

More from Hiroshi Ono (20)

Voltdb - wikipedia
Voltdb - wikipediaVoltdb - wikipedia
Voltdb - wikipedia
 
Gamecenter概説
Gamecenter概説Gamecenter概説
Gamecenter概説
 
EventDrivenArchitecture
EventDrivenArchitectureEventDrivenArchitecture
EventDrivenArchitecture
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
downey08semaphores.pdf
downey08semaphores.pdfdowney08semaphores.pdf
downey08semaphores.pdf
 
BOF1-Scala02.pdf
BOF1-Scala02.pdfBOF1-Scala02.pdf
BOF1-Scala02.pdf
 
TwitterOct2008.pdf
TwitterOct2008.pdfTwitterOct2008.pdf
TwitterOct2008.pdf
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
 
SACSIS2009_TCP.pdf
SACSIS2009_TCP.pdfSACSIS2009_TCP.pdf
SACSIS2009_TCP.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdf
 

Recently uploaded

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

python-cheat-sheet-v1

  • 1. sys Variables String Methods Datetime Methods today() fromordinal(ordinal) argv Command line args capitalize() * lstrip() now(timezoneinfo) combine(date, time) builtin_module_names Linked C modules center(width) partition(sep) utcnow() strptime(date, format) byteorder Native byte order replace(old, new) count(sub, start, end) fromtimestamp(timestamp) check_interval Signal check frequency decode() rfind(sub, start ,end) utcfromtimestamp(timestamp) exec_prefix Root directory encode() rindex(sub, start, end) executable Name of executable endswith(sub) rjust(width) exitfunc Exit function name expandtabs() rpartition(sep) Time Methods modules Loaded modules find(sub, start, end) rsplit(sep) replace() utcoffset() path Search path rstrip() index(sub, start, end) isoformat() dst() platform Current platform isalnum() * split(sep) __str__() tzname() stdin, stdout, stderr File objects for I/O isalpha() * splitlines() strftime(format) version_info Python version info isdigit() * startswith(sub) winver Version number islower() * strip() isspace() * swapcase() * Date Formatting (strftime and strptime) istitle() * title() * sys.argv for $ python foo.py bar qux %a Abbreviated weekday (Sun) isupper() * translate(table) sys.argv[0] %A Weekday (Sunday) foo.py join() upper() * sys.argv[1] %b Abbreviated month name (Jan) bar ljust(width) zfill(width) sys.argv[2] %B Month name (January) qux lower() * %c Date and time %d Day (leading zeros) (01 to 31) Methods marked * are locale os Variables Note dependant for 8-bit strings. %H 24 hour (leading zeros) (00 to 23) Alternative sep altsep %I 12 hour (leading zeros) (01 to 12) Current dir string curdir %j Day of year (001 to 366) List Methods Default search path defpath %m Month (01 to 12) Path of null device devnull %M Minute (00 to 59) append(item) pop(position) Extension separator extsep %p AM or PM count(item) remove(item) Line separator linesep %S Second (00 to 61 4) extend(list) reverse() Name of OS name %U Week number (00 to 53) index(item) sort() 1 Parent dir string pardir %w Weekday (0 to 6) insert(position, item) 2 Patch separator pathsep %W Week number (00 to 53) 3 Path separator sep %x Date File Methods %X Time %y Year without century (00 to 99) close() readlines(size) Registered OS names: “posix”, “nt”, Note “mac”, “os2”, “ce”, “java”, “riscos” %Y Year (2008) flush() seek(offset) %Z Time zone (GMT) fileno() tell() %% A literal quot;%quot; character (%) isatty() truncate(size) Class Special Methods next() write(string) 1. read(size) writelines(list) Sunday as start of week. All days in a __new__(cls) __lt__(self, other) readline(size) new year preceding the first Sunday __init__(self, args) __le__(self, other) are considered to be in week 0. __del__(self) __gt__(self, other) __repr__(self) __ge__(self, other) Indexes and Slices (of a=[0,1,2,3,4,5]) 2. 0 is Sunday, 6 is Saturday. __str__(self) __eq__(self, other) len(a) 6 __cmp__(self, other) __ne__(self, other) a[0] 3. 0 Monday as start of week. All days in a __index__(self) __nonzero__(self) a[5] 5 new year preceding the first Monday __hash__(self) a[-1] 5 are considered to be in week 0. __getattr__(self, name) a[-2] 4 __getattribute__(self, name) a[1:] 4. [1,2,3,4,5] This is not a mistake. Range takes __setattr__(self, name, attr) a[:5] [0,1,2,3,4] account of leap and double-leap __delattr__(self, name) a[:-2] [0,1,2,3] seconds. __call__(self, args, kwargs) a[1:3] [1,2] a[1:-1] [1,2,3,4] Available free from AddedBytes.com b=a[:] Shallow copy of a