Temel olarak ilk başlayanların alacağı syntax hatalarında veya birşey yapmak istediklerinde aklına gelmeyen şeyleri buradan bakabilirler. Bu arada imzana hitaben ben varım (: echo "imzanız zel karakter içermemelidir";

daha profesyonel bi cheatsheethttp://overapi.com/python/

Hocam sen üst seviye kalıyon bana yahu :) 0x656e tarafından 11/Mar/13 19:04 tarihinde düzenlenmiştir

Python konusunda buldugum belgeleri burada paylaşıyorum genelde ne bulursam paylaşıyorum ilgilenenler varsa grmemişlerse baksınlar diye veya normal bir vatandaşı python'a çekmek ilgisini artırmak için Not:Yukarıdakileri neden syledim bilmiyorum;Python kopya kağıdı 3 4, 3 + 4, 3 - 4, 3 / 4 # > 12, 7, -1, 0.75 3 4, 3 // 4, 3 % 4 # > 81, 0, 3 4 > 3, 4 >= 3, 3 3.0, 3!= 4, 3 <= 4 # > True, True, True, True, True # order of operations: brackets, , , , min(3, 4), max(3, 4), abs(-10) # > 3, 4, 10 sum( ) # is a list # > 6 type(3), type(3.0), type # > class 'int', class 'float', # class 'str' int("4"+"0"), float(3), str(1 / 2) # > 40, 3.0, '0.5' "double quotes: ', escaped \" \\ \'" # > double quotes: ', escaped " \ ' 'it\'s "similar" in single quotes ' # > it's "similar" in single quotes ord , chr(66) # > 65, 'B' string = "hello" # the following statements work for lists too len # > 5 string , string # get characters # > "h", "o" string # get a substring # > "el" string , string # l/r substrings # > "he", "llo" string , string # negative indices# > "o", "lo" "con" + "cat" + "enation " + str(123) # > "concatenation 123" "boo" 2 # > "booboo" getLineOfInputAsString = input # > read input print("takes", 0, "or more arguments") # > takes 0 or more arguments print # > using. custom. sep print # > no newlinebye not True, False or True, False and True # > False, True, False # order of operations: brackets, , not, and, or if booleanCondition: x # indent the body block x # every line by the same amount elif anotherCondition: # can do zero, one, or several elif blocks x # multi-line block else: # optional x # multi-line block while booleanCondition: x # the body block break # jump out continue # restart from top of next iteration for indexVariable in range : print # > low, low+1, ..., highPlus-1 # "for item in listOrString:" forall/foreach loops # break, continue can be used in for loops def nameOfNewFunction(argument1, argument2): x # the body block return y # def remember : # writing to global variables global saveBar # after calling foo(3), saveBar = 3 saveBar = bar # even outside of the function's scope # these 'slice' commands have analogues for lists and range "0123456789" # slices # > "02468" "0123456789" # descending # > "9876543210" "0123456789" # > "654" x += 1 # also -=, /=, =, %=, =, //=. Python has no C++-style "x++" x, y = y, x # multiple assignment 3 < x < 5 # same as "(3 < x) and (x < 5)". can chain import math # import, to get everything with period print(math. sqrt(2)) from math import sqrt # import, to get one thing without period print(sqrt(2)) # also in math module: pi, exp, log, sin, cos, tan, ceil, floor, and more list = list. index # > 1 list. index # > causes an error 'three' in list, 'zero' in list # > False, True list. count # > 1 del list # list becomes "string" in "superstring" # > True "superstring". index # > 5 # more list methods: append , insert , extend , # remove , pop , pop , reverse , sort , and more # some string methods: capitalize , lower/upper , islower/isupper , # isalpha/isdigit , center/ljust/rjust , strip , split , # splitlines , endswith/startswith , find , replace , # and more myList = actuallyTheSameList = myList # not a true copy! just copies the reference myList is actuallyTheSameList # > True realCopy = myList # or list , copy. copy , deepcopy realCopy is myList # > FalsePDF olarak yazdırılabilir hali için buyurun : http://cscircles.cemc. uwaterloo. ca/static/cheatsheet. pdf