0% found this document useful (0 votes)
3 views3 pages

Python Notes

The document provides a comprehensive list of built-in Python commands categorized into basic data types, type conversion functions, input/output functions, math and logic functions, utility and type checking, built-in constants, and common built-in functions. Each category includes specific commands with brief descriptions of their functionality. This serves as a reference for Python programming essentials.

Uploaded by

AuRix
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Python Notes

The document provides a comprehensive list of built-in Python commands categorized into basic data types, type conversion functions, input/output functions, math and logic functions, utility and type checking, built-in constants, and common built-in functions. Each category includes specific commands with brief descriptions of their functionality. This serves as a reference for Python programming essentials.

Uploaded by

AuRix
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

In Python, "commands" like int, float, str, etc.

, are built-in types,


functions, and keywords. Here's a categorized list of built-in Python
commands that you might be referring to, especially for types and basic
functionality:

✅ Basic Built-in Data Types

These are used to represent values:

 int – Integer (e.g., 5)

 float – Floating-point number (e.g., 5.0)

 complex – Complex number (e.g., 3+4j)

 str – String (e.g., "hello")

 bool – Boolean (True or False)

 bytes – Immutable sequence of bytes

 bytearray – Mutable sequence of bytes

 list – Ordered, mutable collection (e.g., [1, 2, 3])

 tuple – Ordered, immutable collection (e.g., (1, 2, 3))

 set – Unordered collection of unique elements (e.g., {1, 2, 3})

 frozenset – Immutable version of a set

 dict – Dictionary or mapping type (e.g., {"a": 1, "b": 2})

 range – Immutable sequence of numbers (e.g., range(5))

✅ Type Conversion Functions

Used to convert between types:

 int() – Convert to integer

 float() – Convert to float

 str() – Convert to string

 bool() – Convert to boolean

 list() – Convert to list

 tuple() – Convert to tuple

 set() – Convert to set


 dict() – Convert to dictionary

 complex() – Convert to complex number

 chr() – Convert int to character

 ord() – Convert character to Unicode code

 hex() – Convert int to hexadecimal string

 bin() – Convert int to binary string

 oct() – Convert int to octal string

✅ Input/Output Functions

 print() – Output to console

 input() – Read input from user

 format() – Format string

 len() – Get length of a container

✅ Math & Logic Functions

 abs() – Absolute value

 pow() – Exponentiation

 round() – Round to nearest integer

 divmod() – Get quotient and remainder

 max() – Get max value

 min() – Get min value

 sum() – Get sum of iterable

✅ Utility & Type Checking

 type() – Get type of object

 isinstance() – Check instance type

 id() – Get memory address

 hash() – Get hash value

 eval() – Evaluate a string as code


 exec() – Execute Python code dynamically

 repr() – Get string representation

 globals() / locals() – Get global/local namespace

✅ Built-in Constants

 None

 True

 False

 Ellipsis (...)

 NotImplemented

✅ Common Built-in Functions

 enumerate() – Iterate with index

 zip() – Combine iterables

 map() – Apply function to iterable

 filter() – Filter iterable

 reversed() – Reverse iterable

 sorted() – Return sorted iterable

 all() – True if all elements are true

 any() – True if any element is true

 next() – Get next item from iterator

 iter() – Create iterator

You might also like