Python 3

This is a summary of Udemy - Python Bootcamp.
Enable Javascript for TOC.

Basics

Here comes a list of the basics which needs to be known, to understand advanced examples:

Lists, Dictionaries, etc

Classes

Exceptions

See at page templates.

Generators

Generators behave like methods which return a list - but with the big difference, that the list entries are generated on demand. So the method runs till the first call of yield, returns the result and supsends. When the next result is read, the method resumes. When no futher result is accessed, also no further result is generated.
def FunctionWithYield():
	sum = 0
	for counter in range(7,99):
		sum = sum + counter
		yield sum

# will print "7, 15, 24..." but not over 100
for result in FunctionWithYield():
	if result > 100:
		break
	print(result)

Tools