Skip to main content
ProductsDesktop toolsTASTECADDrawing reviewTASTEFILESFile managementTASTEFTPFile transferTASTESSHRemote workspaceTASTEZIPCompression and extractionTASTEWINMFile managementDeveloper toolsTASTECODERust integrated development environmentTASTESTUDIOIntegrated development and test environmentTASTEETLData integration (ETL)ServersTASTEREMOTERemote desktop serverTASTEGEOGeospatial serverTASTEMAILMail workspaceInvestingTASTESTOCKStock auto-trading desktop appGet startedDownloadsDocumentationBuyAll products
Marketplace
News
TechNewsToday's dev newsDeveloper docsProgramming languagesRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp & desktop frameworksTauriFlutterReact NativeElectronAlgorithmsAlgorithm basicsCore algorithmsAdvanced algorithmsPractical algorithms
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcaseCommunity guide
Work with usTech transferWebsite buildDesktop app buildRelease and payment pipelineSales partnerContact
ServicesRemote desktopCustom installer packages
TASTEDEV
Products

Desktop tools

TASTECADComplex drawings, opened with easeTASTEFILESJust the files you need, as fast as possibleTASTEFTPThe tidiest path for your filesTASTESSHA stronger link between you and your serversTASTEZIPPack faster, unpack saferTASTEWINMA keyboard-first file manager with two panes

Developer tools

TASTECODEEdit, build, debug and test Rust apps in one windowTASTESTUDIOFrom editing to remote tests and approved AI fixesTASTEETLMove data while you watch the values

Servers

TASTEREMOTEA remote desktop you run on your own serverTASTEGEORebuilding a GeoServer-compatible geospatial server in RustTASTEMAILTake back control of your email

Investing

TASTESTOCKStock auto-trading that follows the rules you set: when, and what

Get started

DownloadsLatest builds of every productDocsHow to use each productBuySubscriptions and perpetual licencesAll productsEvery product at a glance
All products
MarketplaceNews
Tech

News

Today's dev newsOfficial announcements on languages, frameworks, GitHub and AIDeveloper docsGuides to languages, frameworks and algorithms

Programming languages

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App & desktop frameworksTauriFlutterReact NativeElectron

Algorithms

Algorithm basicsComplexity analysis · Sorting · Searching · Basic data structures · Trees and heapsCore algorithmsGraph traversal · Shortest paths & minimum spanning trees · Dynamic programming · Greedy algorithms · Divide and conquer · BacktrackingAdvanced algorithmsString algorithms · Math and number theory · Bit manipulation · Segment trees · Union-findPractical algorithmsCoding interview strategy · LRU cache · Rate limiting · Consistent hashing
All development docs
Community
ProjectsDiscover builders and their workDevelopment logsDecisions and lessons learnedPromptsReusable instructionsAI tool issuesProblems and workarounds for Claude, Codex, GeminiShowcaseFinished resultsCommunity guideHow we build in the open
Work with us
Tech transferNative apps in Rust and eguiWebsite build10 languages, accounts, docs and downloadsDesktop app buildRust and egui, no WebViewRelease and payment pipelineSigning, MSI, deb, rpm, AppImage, hashesSales partnerRecommend us and earn 30%ContactBuilds, partnerships and investment
Services
Remote desktopReach your computer from a browserCustom installer packagesOnly the features you need, settings preloaded
Buy
EN
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Log in
Log in
TASTEDEV

From small tools to better development.

support@tastedev.netSupport TASTEDEV
ProductsProduct lineupBuyDocsDownloadsMarketplaceSupport
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcase
PoliciesAbout usPrivacy policyTerms of serviceSubscription termsRefund policyCommunity guidelines
AccountLog inSign up
Visitors
Today
Yesterday
Total views
Company
GXSOFT
Representative
CHOI YOUNG GU
Business registration number
853-44-00368
Address
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Phone
+82-10-4404-1523
Email
whitecalvin@tastedev.net
Privacy officer
CHOI YOUNG GU

© 2026 TASTEDEVProduct information is based on verified development sources.Released · improving

Python docs
Python
Getting StartedSyntax BasicsTypes and DataModules and PackagesErrors and TestingKey Concepts
Discussions

Python guide · 2/6

Syntax Basics

Python's syntax is famously compact, but a few of its rules surprise newcomers from brace-based languages. This chapter walks through variables, indentation, functions and their flexible argument handling, control flow, and f-strings, the everyday way to build text.

Variables and names

There is no declaration keyword: a variable comes into existence the first time you assign to it. Think of a variable as a label attached to a value. The value has a type; the label does not, so the same name can later point at something of a different type.

count = 3
name = "Python"
pi = 3.14159
is_ready = True

# assign several names at once, then swap them
x, y = 1, 2
x, y = y, x

# convention: snake_case for variables and functions, UPPER_CASE for constants
MAX_RETRIES = 5

Most projects follow the PEP 8 style guide: snake_case for functions and variables, PascalCase for classes, and UPPER_CASE for module-level constants.

Indentation is the block structure

Instead of braces, Python uses indentation. Statements that open a block, such as if, for, def and class, end with a colon, and every line indented beneath them at the same depth belongs to that block. Four spaces per level is the standard. Mixing tabs and spaces causes errors, so configure your editor to insert spaces. Comments start with #, and a triple-quoted string placed directly under a function or class becomes its docstring, which help() and editors display as documentation.

Functions

Define functions with def and hand back a result with return; a function that never returns explicitly gives back None. Parameters can have defaults, and callers may pass arguments by name, which makes call sites self-documenting.

def greet(name: str, greeting: str = "Hello") -> str:
    return f"{greeting}, {name}!"


greet("Mina")                      # 'Hello, Mina!'
greet("Mina", greeting="Hi")       # 'Hi, Mina!'
greet(greeting="Hey", name="Joon") # 'Hey, Joon!'

When a function should accept a variable number of arguments, use *args to collect extra positional arguments into a tuple and **kwargs to collect extra keyword arguments into a dict. A bare * in the parameter list makes everything after it keyword-only.

def log(message, *args, level="INFO", **kwargs):
    print(level, message, args, kwargs)


log("start", 1, 2, user="kim")
# INFO start (1, 2) {'user': 'kim'}


def connect(host, *, timeout=10):
    ...


connect("db.local", timeout=5)  # timeout can only be passed by name

One classic trap: default values are evaluated once, when the function is defined. Writing def add(item, items=[]) means every call shares the same list. Use None as the default and create a fresh list inside the function instead.

Control flow

Branching uses if, elif and else. Boolean operators are spelled out as words: and, or, not. There are two loops: while, and for, which walks over anything iterable, including lists, strings, dicts, files and ranges.

score = 82
if score >= 90:
    grade = "A"
elif score >= 80:
    grade = "B"
else:
    grade = "C"

for i in range(3):          # 0, 1, 2
    print(i)

fruits = ["apple", "banana"]
for index, fruit in enumerate(fruits):
    print(index, fruit)

n = 10
while n > 0:
    n -= 3
    if n == 4:
        continue
    print(n)

break leaves a loop early and continue skips to the next iteration. For a compact choice between two values there is the conditional expression, "even" if n % 2 == 0 else "odd". When you need to branch on the shape of a value, the match statement offers structural pattern matching.

f-strings

Prefix a string literal with f and you can embed variables and arbitrary expressions in braces. A format spec after a colon controls decimals, width, alignment and thousands separators, and a trailing = prints both the expression and its value, which is great for quick debugging.

name = "Mina"
price = 12345.678

print(f"Hi {name}, your total is ${price:,.2f}")  # 12,345.68
print(f"{name:>10}|")     # right-aligned in a field of 10
print(f"{len(name) * 2}") # any expression works
print(f"{price=}")        # price=12345.678

Summary

  • Variables are created by assignment; types belong to values, not names.
  • Blocks are marked by a colon and four-space indentation.
  • Functions support defaults, keyword arguments, *args and **kwargs; never use a mutable object as a default.
  • Use if/elif/else, for and while for control flow, and f-strings for building text.
Questions about this chapter?
Previous chapterGetting StartedNext chapterTypes and Data

0 comments

Top commentsNewest first

Sign in · Sign in to leave a comment.