This is an old revision of the document!


Python3 Crash Course

Command Line (CLI)

Start REPL (Read Execute Print Repeat) interactive mode and exit:

shell$ python
>>> 
>>> quit()
shell$

Execute files:

shell$ python filename.py
shell$ python filename.py arg1 arg2 arg3

Basics

Variables:

a = 10
b = "Ana are mere"
c = [1, 2, 3]

Functions:

def my_function(a

Input/Output

Data Structure

Lists:

l1 = [1, 2, 3]
l2 = [10, 'mere', [25, 20], {}, ]

Object Oriented Programming



Conditions & Loops

i = 0
cnt1 = 0
while i < 10:
    if i%2 == 0:
        cnt += 1
 
 range(), len(), type()

fsafsafsa

References

ic/resurse/python.1601040796.txt.gz · Last modified: 2020/09/25 16:33 by acosmin.maria
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0