Save
Final 3600
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Enrico
Visit profile
Subdecks (1)
Compilers
Final 3600
100 cards
Cards (173)
Shebang
Indicates script
execution
details and Python version
compatibility
Python
Library
Includes standard and
third-party
modules for various
functionalities
Modules
Contain Python
source files
or C extensions, accessed via
import
Interactive
Shell
Allows typing statements and expressions at prompt for
immediate execution
Arithmetic
Operators
Perform mathematical operations with defined
precedence
Math
Commands
Provide functions for
mathematical
calculations and
constants
Variables
Named
placeholders
for
values
, dynamically typed in Python
Print
Outputs text to the terminal, moves cursor to
next
line
Reading
Input
Uses
input
to read user
input
, stores result in a variable
For
Loop
Repeats statements for a set of values, specified with
range
function
Control
Flow
Defines
true
and
false
conditions in Python scripts
If Statement
Executes statements
if
a specified
condition is true
While
Loop
Executes statements as long as a
condition
remains
true
Logic
Defines
logical
expressions and
operators
for decision-making
Strings
Sequence of
characters
enclosed in
quotation marks
String
Indexes
Numerical representation of
characters
in a string, starting from
0
String
Properties
Includes functions like
len
,
lower
, and upper for string manipulation
String
Operations
Methods like find and split for string
searching
and
splitting
Strings
are Read Only
Strings in Python are
immutable
and cannot be directly
modified
Strings
and Numbers
Conversion functions ord and chr for string to number and vice versa
Lists
Compound data type; ordered collection of
items
len
(
)
Function to get the length of a list
Indexing
Using [] to access items in a
list
Append
Add an
element
to the end of a list
del
Remove an element from a list
Sort
Arrange
list elements in default order
Reverse
Reverse the
order
of elements in a list
Insert
Add an element at a specified
position
in a list
open
()
Function to
open
files for
reading
or writing
read
()
Read
all data from a
file
readline
()
Read a
single line
from a
file
readlines
()
Read
data from a file as a list of
lines
Formatted
I/
O
Using % operator for formatted
input
/output
File
Processing
Reading
, writing, and
processing
files
Functions
Reusable blocks of code;
defined
using def keyword
Arguments
Values
passed to a
function
when called
Return
Statement
Specifies the
value
returned by a function
Tuples
Ordered
,
immutable
collection of items
Class
Blueprint for creating objects with
attributes
and
methods
Method
Function
defined within a
class
See all 173 cards