Python Functions: Writing User-Defined Functions Worth Reusing
How to write Python functions: arguments, defaults, *args and **kwargs, scope, type hints and docstrings, plus the mutable default bug everyone hits once.
Search
29 articles matched your search.
How to write Python functions: arguments, defaults, *args and **kwargs, scope, type hints and docstrings, plus the mutable default bug everyone hits once.
A Python lambda function is a one-expression anonymous function. Learn where it helps (sort keys, callbacks), when def wins, and the loop bug it causes.
Regular expressions in Python from the ground up: raw strings, core syntax, match vs search vs fullmatch, flags, and five mistakes that silently break patterns.
Advanced Python regex with tested output: named groups, lookarounds, re.sub with a function, and why a 24-character input made (a+)+$ run for 10 seconds.
Iterators and generators in Python explained: yield, pipelines that stream big files in flat memory, itertools, and why a generator silently runs only once.
Programming for data science: how much SQL and Python you need, what reproducible code looks like, the notebook traps, and where AI assistants help or hurt.
Python classes and objects explained with tested code: __init__, self, dunder methods, properties and dataclasses, plus the shared-list bug to learn first.
NumPy aggregation along axes, NaN-safe statistics, argmax, sorting and linalg.solve, plus why NumPy and pandas return different standard deviations.
Inheritance and composition in Python with tested code: when to use each, how super() really works, duck typing, and why deep class hierarchies backfire.
A stage-gated data scientist roadmap for 2026: SQL, statistics, modelling and communication, weighted as interviews test them, with projects and free resources.
Pick an advanced data analytics course that goes past dashboards: five options compared on price and predictive depth, plus the four topics a syllabus needs.
How to choose a data analytics course with Python online: five options compared, the small Python subset analysts need, and why SQL still comes first.
Plotly tutorial for Python: interactive charts in one Plotly Express call, when to use Graph Objects, styling, faceting, and HTML exports 100x smaller.
Advanced Plotly charts in Python: subplots, dual axes, animation, 3D and heatmaps, plus the axis-range mistake that silently drops points from animations.
Python basics with runnable examples: names and objects, lists, dicts and sets, control flow and comprehensions, plus the traps behind most beginner bugs.
Most beginner courses assume you can code by week two. How to pick a data science course for non-programmers, the real timeline, and the first job to target.
The data science tools working analysts actually use, what each is for, when to learn it, and the validation techniques that matter more than any library.
Matplotlib styling for report-ready charts: rcParams, style sheets, colormaps, annotation and clean export, and why plt.style.use('seaborn') now fails.
How to use Python tuples well: creating them, unpacking, using them as dict keys, named tuples, and the one-element and += gotchas that catch everybody.
Lists vs tuples in Python beyond 'one is mutable': the real differences in hashability, memory, safety and intent, plus a decision rule that works in practice.
Python operators explained with outputs for every example, plus why is works for 256 but fails for 257 and why and/or rarely return booleans.
The 5 Ps of data science (Problem, People, Process, Platform, Portfolio): the question each forces, the failure it exposes, and why the order matters.
Pick a business analytics course by the job you want: decision-focused for managers, data science depth for analysts. Five compared, plus the skill most skip.
What a data science course for managers should teach AI leaders: the four decisions you will own, the literacy floor and five checks before you pay.
NumPy tutorial for beginners: what an array is, why it ran about 20 times faster than a list here, how one stray string turns numbers into text, and more.
A six-month AI engineer roadmap built on what teams hire for in 2026: retrieval, evaluation, cost control and guardrails, with projects and official resources.
Python strings in practice: f-strings, slicing, the methods worth memorising, why += loops slow down, and the encoding default that breaks scripts on Windows.
Exception handling in Python done properly: try, except, else and finally, custom exceptions, chaining and logging, and why a bare except can break Ctrl-C.
Looking for the best data science course in India? Nine programmes ranked by fees, duration and checked placement claims, with who each one suits.