Sitemap

PYTHON SYNTAX

Nov 18, 2026

--

Python syntax means is a set of rules used to write python programs

As in english has a grammer .Python also follows some rules and the rules are called as python syntax

Set of rules to be followed while giving variable name

Variable name should start always h alphabets or __(under score)

Variable can contain digits / numbers [0–9]

Get Vardhavikas’s stories in your inbox

Join Medium for free to get updates from this writer.

Variables name should not contain any special character ,symbols (. ! @ $)

Variables should not be keywords or never use keywords or variables names (true,false,none)

Python is a case sensitive language

AB — Capital letters — different meaning

ab — Small letters — different meaning

STRING METHODS

String methods are built-in functions used to perform operations on strings, such as converting uppercase to lowercase, removing spaces, replacing characters, and searching for words.

upper()
lower()
capitalize()
title()
swapcase()
strip()
find()
index()
count()
replace()

--

--