python_cheat_sheet
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
python_cheat_sheet [2010/06/18 18:31] – ginko | python_cheat_sheet [2010/06/28 16:12] – ginko | ||
---|---|---|---|
Line 35: | Line 35: | ||
===== IO ===== | ===== IO ===== | ||
* Ouvrir un fichier <code python>#' | * Ouvrir un fichier <code python>#' | ||
- | fichier=open('/ | + | fichier=open('/ |
+ | # il faut alors fermer le fichier | ||
+ | # une métode qui referme le fichier proprement: | ||
+ | with open('/ | ||
+ | </ | ||
* '' | * '' | ||
* Sortie vers le shell: <code python> | * Sortie vers le shell: <code python> |
python_cheat_sheet.txt · Last modified: 2015/01/02 13:03 by ginko