// resources

Resources

// Code Example
parameters.py
Parameters — pass values into a function, function uses them. One function, many possible inputs. Parameter in definiti…
[ download ]
// Code Example
default_parameters.py
Default parameters — a fallback value when you don't pass one. Required parameters first, defaults after. Override when…
19 downloads 05 May 2026 → A value if you don't provide one
[ download ]
// Code Example
return_statement.py
return — send a value back to the caller. Store it, print it, pass it on. First return reached stops the function. No r…
19 downloads 05 May 2026 → Your function finally talks back
[ download ]
// Code Example
scope.py
Local vs global — where variables live. Local dies with the function, global is readable everywhere. Use return to get …
[ download ]
// Code Example
multiple_return_values.py
Multiple return values — return a, b packs two values, x, y = function() unpacks them. Order matters. Use only what you…
19 downloads 05 May 2026 → Return two things at once
[ download ]
// Code Example
try_except.py
try / except — handle errors gracefully. Wrap code that might fail, catch specific errors, program continues. No crash.
19 downloads 05 May 2026 → Don't let errors crash your program
[ download ]
// Code Example
try_except_else_finally.py
try / except / else / finally — the full picture. else runs on success, finally always runs. Use only what you need.
[ download ]
// Code Example
raise_statement.py
raise — throw your own errors. Enforce your function's rules. as e gives access to the message. Always pair with try / …
19 downloads 05 May 2026 → Throw your own errors
[ download ]
// Code Example
list_creation.py
List creation — literals, empty lists, range sequences, and string conversion. Every way Python lets you build one.
18 downloads 05 May 2026 → How to Build a List in Python
[ download ]
// Code Example
split_method.py
split() — cutting strings into lists. Default whitespace split, custom separators, maxsplit, and the difference between…
[ download ]
// Code Example
list_indexing_slicing.py
Indexing and slicing — reaching into a list for one element or many. Positive and negative indexes, slice ranges, step,…
18 downloads 05 May 2026 → Getting Elements Out of a List
[ download ]
// Code Example
list_methods_mutating.py
Mutating list methods — append, insert, extend, remove, pop, clear, sort, reverse. Methods that change the list directl…
18 downloads 05 May 2026 → List Methods That Change the List
[ download ]
// Code Example
list_methods_inspection.py
Inspection methods — in, len, index, count, copy, min, max, sum. Reading a list without changing it, and the copy trap …
18 downloads 05 May 2026 → How to Inspect a List
[ download ]
// Code Example
list_iteration.py
Iterating over lists — for loops, enumerate, zip, and while. Every pattern for going through a list, and when to reach …
18 downloads 05 May 2026 → Going Through Every Element
[ download ]
// Code Example
list_nested.py
Nested lists — lists inside lists. Creating, accessing with double indexes, looping with nested for, modifying inner li…
18 downloads 05 May 2026 → Going Deeper with Nested Lists
[ download ]