Skip to content

sugaliudaykiran/Python_Ds

Repository files navigation

JNTUADATASCIENCE

Recorded Sessions Link

Markdown Cheat Sheet Link

Day2 Agenda:

  • Hello World...!

  • Checking your python version

  • comments

  • Variable creation

    • A variable in programming is used to store the values/data
    • single variable assignment
    • Multi variable assignment
  • Indentation

  • Data Types

    • Text Type: str
    • Numeric Types: int, float, complex
    • Sequence Types: list, tuple, range
    • Mapping Type: dict
    • Set Types: set, frozenset
    • Boolean Type: bool
  • Type Casting

  • Dynamic Input Reading

  • Operators

    A. Arithmetic Operators ( +,-,%,/,//,*)

    B. Assignment Operators ( =, +=, -=, *=, %=, /=, //=)

    C. Comparison operators ( ==, >=, <=, !=, >, < )

    D. Logical operators ( and, or, not )

    E. Bitwise Operators ( &, |, ~, ^, >>, <<)

    F. Identity Operators ( is , is not )

    G. Membership Operators ( in , not in )

Day5 Agenda

Strings

  • Set of Characters
  • Sequence of characters
  • Strings are immutable
  • any sequence of characters either with in single or double quotes
  • A data type that stores a sequence of elements in character form.
  • String Slicing
    • Indexing was only limited to accessing a single element, Slicing on the other hand is accessing a sequence of data inside the string.
  • String Methods

Day6 Agenda

Data Structures

  • Data structures refer to the collection or group of data in a particular structure.

List

Lists are the most commonly used data structure. Think of it as a sequence of data that is enclosed in square brackets and data are separated by a comma. Each of these data can be accessed by calling it's index value.

Lists are declared by just equating a variable to '[ ]' or list. We can use lists to hold an ordered sequence of values.

It holds different types of variables in the same list

Lists are mutable, their contents can change as more statements are interpreted.

Methods

Method Name Use Explanation
append alist.append(item) Adds a new item to the end of a list
insert alist.insert(i,item) Inserts an item at the ith position in a list
pop alist.pop() Removes and returns the last item in a list
sort alist.sort() Modifies a list to be sorted
reverse alist.reverse() Modifies a list to be in reverse order
del del alist[i] Deletes the item in the ith position
index alist.index(item) Returns the index of the first occurrence of item
count alist.count(item) Returns the number of occurrences of item
remove alist.remove(item) Removes the first occurrence of item

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •