DEV Community

Cover image for PYTHON PROGRAMMING
Vinoth Kumar
Vinoth Kumar

Posted on

PYTHON PROGRAMMING

PYTHON : Python is a high-level programming language known for its simple and readable syntax

  • Allows writing clean code with fewer lines.
  • Supports multiple programming paradigms including object-oriented, functional and procedural programming.
  • Widely used in web development, automation, data analysis, artificial intelligence and many other fields.
  • Dynamically typed and has automatic garbage collection.

PYTHON DATA TYPES:

LIST.
TUPLE.
SET.
DICTIONARY.
SEQUENCETYPE.

LIST:

  1. Ordered and mutable collections used to store multiple items in a single variable.
  2. Elements in a list can be of different data types and are accessed using indexing.

TUPLE:

  1. Ordered and immutable collections used to store multiple items in a single variable.
  2. Once created, tuple elements cannot be modified and are accessed using indexing.

SET:

  1. Unordered and mutable collections used to store unique elements.
  2. Sets are unordered, elements cannot be accessed using indexing.

DICTIONARY:

  1. It's used to store data in key:value pairs.
  2. Each key in a dictionary must be unique and values are accessed using their keys with square brackets [] or get() method.

SEQUENCE TYPE:

  1. An ordered collection of items, which can be of similar or different data types.
  2. Elements in a sequence can be accessed using indexing.

Top comments (0)