Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | Multiply numbers using lambda

Example 1: Output: Enter 1st number: 2Enter 2nd number: 3Enter 3rd number: 4Multiplication result is: 24 Example 2: Output: Enter numbers: 4 5 6 7840

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | Print Namaste using lambda

Output: Namaste

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Iterate over a string in Python

Output for all methods: C o p y A s s i g n m e n t

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | join() | Join list of strings

Output: str1 str2 str3 str1 and str2 and str3

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | isalnum() method | check if a string consists only of alphabetical characters or numerical digits

Output: True False

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | isupper() and islower() methods to check if a string is in all uppercase or lowercase letters

Output: True False True False

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | count substring in a String | count() method

Output: 2 2 1

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | enumerate() on String | Get index and element

Output: <–Index–> VS <–Element–> 0 a 1 S 2 t 3 r 4 i 5 n 6 g

Continue Reading
Posted in allcategorites programs in python python simple programs python-short-tutorial

Python | Convert a String to list using list() method

Output: [‘a’, ‘S’, ‘t’, ‘r’, ‘i’, ‘n’, ‘g’]

Continue Reading
Euler's Number in Python
Posted in allcategorites programs in python python-short-tutorial

Euler’s Number in Python

Today, we will throw light on Euler’s Number in Python. You must have used constants while dealing with Mathematics, Chemistry, Physics, etc. Constant in terms…

Continue Reading