Python

From ZENotes
(Difference between revisions)
Jump to: navigation, search
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
 
From http://interactivepython.org/courselib/static/thinkcspy/GeneralIntro/introduction.html
 
From http://interactivepython.org/courselib/static/thinkcspy/GeneralIntro/introduction.html
 +
 +
Also, Sanam should look at http://www.pyladies.com/
  
 
[[Python snippets]]
 
[[Python snippets]]
Line 5: Line 7:
 
[[Python glossary]]
 
[[Python glossary]]
  
 +
[[Python modules]]
 +
 +
 +
'''Python keywords'''
 
{| class="wikitable"
 
{| class="wikitable"
!Python keywords|
 
 
|-
 
|-
|and ||as|| assert ||break ||class|| continue
+
|and||as||assert
 
|-
 
|-
|def ||del || elif ||else ||except ||exec
+
|break
 
|-
 
|-
|finally || for || from ||global || if || import
+
|class||continue
 
|-
 
|-
|in ||is || lambda|| nonlocal|| not || or
+
|def||del
 
|-
 
|-
|pass ||raise|| return|| try || while || with
+
|elif||else||except||exec
 
|-
 
|-
|yield|| True|| False|| None || ||
+
|False||finally||for||from
|
+
|-
 +
|global
 +
|-
 +
|if||import||in||is
 +
|-
 +
|lambda
 +
|-
 +
|nonlocal||None||not
 +
|-
 +
|or
 +
|-
 +
|pass
 +
|-
 +
|raise||return
 +
|-
 +
|try||True
 +
|-
 +
|while||with
 +
|-
 +
|yield
 +
|}
 +
 
 +
 
 +
The following are all legal Python expressions whose meaning is more or less clear:
 +
 
 +
20 + 32
 +
hour - 1
 +
hour * 60 + minute
 +
minute / 60
 +
5 ** 2
 +
(5 + 9) * (15 - 7)
 +
 
 +
 
 +
 
  
  
 
Back to [[Self training]]
 
Back to [[Self training]]

Latest revision as of 08:00, 18 May 2013

From http://interactivepython.org/courselib/static/thinkcspy/GeneralIntro/introduction.html

Also, Sanam should look at http://www.pyladies.com/

Python snippets

Python glossary

Python modules


Python keywords

and as assert
break
class continue
def del
elif else except exec
False finally for from
global
if import in is
lambda
nonlocal None not
or
pass
raise return
try True
while with
yield


The following are all legal Python expressions whose meaning is more or less clear:

20 + 32
hour - 1
hour * 60 + minute
minute / 60
5 ** 2
(5 + 9) * (15 - 7)



Back to Self training

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox