Convert case of elements in a list of strings Python

Given a list of strings, write a Python program to convert case of all string from lowercase/uppercase to uppercase/lowercase. Input : [‘PrO’, ‘pROG’, ‘RAMmInG’] Output: [‘pro’, ‘prog’, ‘ramming’] Input : [‘fun’, ‘Foo’, ‘BaR’] Output: [‘FUN’, ‘FOO’, ‘BAR’] Method #1 : Convert Uppercase to Lowercase using map function out = map(lambda x:x.lower(), [ ‘PrO’, ‘pROG’, ‘RAMmInG’]) … Read more

Method resolution order in Python Inheritance

Method Resolution Order : Method Resolution Order(MRO) it denotes the way a programming language resolves a method or attribute. Python supports classes inheriting from other classes. The class being inherited is called the Parent or Superclass, while the class that inherits is called the Child or Subclass. In python, method resolution order defines the order … Read more

Operator Overloading in Python

In this article, we’ll learn about operator overloading in Python with examples. We all know what are operators (+, -, <=). In python, operators work for built in classes, but some operator behaves differently with different types. For example ‘+’ operator can add two numbers and also can concatenate two strings. Program: Program: a = … Read more

Some Popular Python GUI Libraries

Here we will talk about some of the popular Python GUI Libraries, we will compare the three major GUI libraries their positives and negatives. Let’s look at some of the most popular options available to Python developers and see how they stack up. All three are cross-platform and can be used on your operating system … Read more