70 likes | 207 Views
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. -Geeky Quote-. Python Baby. Learning Python. Python are urmatoarele avantaje: *limbaj interpretat *usor de scris
E N D
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. -Geeky Quote- Python Baby
Learning Python Python are urmatoarele avantaje: *limbaj interpretat *usor de scris *multe clase si biblioteci, o groaza de api-uri *flexibil *intuitiv *documentatie stufoasa *nume cool *cod curat Dezavantaje *It's a little on the slow side *Nu are nici un ide ca lumea. Eclipse is the best so far!
Liste Tupluri: liste statice care nu pot fi modificate a=(d,b,c) Liste:liste simple a=[d,b,c] Dictionare: face un cuplaj intre 2 seturi de cuvinte. Apelul e o(log(n)) pe querry a= {coca:cola,ana:mere,windows:bad};
Clasele Clasele au avantajele fata de clasele din c++ sau java: *sunt usor de scris class a va_fi_admin=None; *variabilele sunt referinte,deci *NU PREA AVEM NEVOIE DE DESTRUCTOR *GOT RID OF THAT NASTY SEGFAULT *POT SA MA DECID MAI INCOLO CE E O VARIABILA=FLEXIBILITATE++
Flexibilitate is cool! Class a l=[] b=a(); c=a(); b.l.append("ceva"); c.l.append(5);
Easy coding- And it's fast! S=[j for j in range(2,1000) if len([i for i in range(2,j - 1) if j % i == 0])==0]; -numerele prime! Cel mai bun mod de a concatena stringuri in python: def method6(): return ''.join([`num` for num in xrange(loop_count)])
Surse de "inspiratie" -Google Code Jam-faci filtru dupa python si sunt niste useri destul de buni -Sursele open-source, api-uri si Google. -Dive into Python