2. Premier programme¶
Ouvrez votre edteur préféré
configurez le pour que tab= 4 espaces
tapez votre code comme dans le terminal
sauvegardez first.py
first.py
for i in range(5):
print (i)
Dans le terminal : python first.py ou python3 first.py
Pour un exécutable (sans taper python): hashbang et chmod
#!/usr/bin/env python
for i in range(5):
print (i)
Dans le terminal : ./first.py