Python | Ways to find length of list

Python | Ways to find length of list

List being an integral part of Python day to day programming has to be learned by all the python users. And having a knowledge of its utility and operations is essential and always a plus. So this article discusses one such utility of finding the no. of elements in a list

Transpose a matrix in Single line in Python

Transpose a matrix in Single line in Python

Transpose a matrix in Single line in Python Transpose of a matrix is a task we all can perform very easily in python (Using a nested loop). In Python, we can implement a matrix as nested list (list inside a list). Each element is treated as a row of the matrix.

Python | Get Kth Column of Matrix

Python | Get Kth Column of Matrix

Sometimes, while working with Python Matrix, one can have a problem in which one needs to find the Kth column of Matrix. This is a very popular problem in Machine Learning Domain and having solution to this is useful. Let’s discuss certain ways in which this problem can be solved.

Ways to remove i’th character from string in Python

Ways to remove i’th character from string in Python

In Python it is all known that string is immutable and hence sometimes poses visible restrictions while coding the constructs that are required in day-day programming. This article presents one such problem of removing i’th character from string and talks about possible solutions that can be employed in achieving them.

Python | Ways to remove a key from dictionary

Handling missing keys in Python dictionaries (7)

Dictionary is used in manifold practical applications such as day-day programming, web development and AI/ML programming as well, making it a useful container overall. Hence, knowing shorthands for achieving different tasks related to dictionary usage always is a plus. This article deals with one such task of deleting a dictionary key-value pair from a dictionary.

Python – Convert key-values list to flat dictionary

Python – Convert key-values list to flat dictionary

Sometimes, while working with Python dictionaries, we can have a problem in which we need to flatten dictionary of key-value pair pairing the equal index elements together. This can have utilities in web development and Data Science domain.

Python dictionary with keys having multiple inputs

Print anagrams together in Python using List and Dictionary (3)

How to create a dictionary where a key is formed using inputs? Let us consider an example where have an equation for three input variables, x, y, and z. We want to store values of equation for different input triplets.