Posts Tagged with 'Python'
Python program for bubble sort
Python | Bubble sort program Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are not in the right order. This is an example for bubble sort …
Factorial program in python using recursion
Python | Program to find factorial of a number using recursive function This is an example of how to find the factorial of a number in python using a recursive function. The factorial of a …
Factorial program in python
Python | Program to find factorial of a number This is an example of how to find the factorial of a number in python. The factorial of a number is a product of all the positive …
How to define an empty class in python
Python | Create an empty class In python, it required adding a pass statement to define an empty class. The pass is a special statement in python that does nothing. It just works as a dummy statement. …
Program to check palindrome in python
Python | Check whether the given value is palindrome or not This is an example of how to check whether the given value is palindrome or not. It takes input from the user to check …
Program to check prime number in python
Python | Check whether the given number is a prime number or not This is an example of how to check whether the given number is a prime number or not. It takes an input …
Print Triangle pyramid pattern in python
Python | Print Triangle pyramid pattern This is an example of how to print the Triangle pyramid pattern. It takes an input number from the user to print the number of rows for the pattern. n …
Fibonacci series in python
Python | Fibonacci series This is an example of how to print the Fibonacci series. It takes an input number from the user to print the Fibonacci series. The Fibonacci series is a sequence of …
Print prime number between 1 to 100 in python
Python | Print prime no between 1 to 100 This is an example of how to print all prime numbers between 1 and 100 using for loop. A prime number is a natural number greater …
How to encrypt and decrypt using AWS KMS key in python with boto3
Python | Encrypt and Decrypt using AWS KMS key in python with boto3 This is an example of how to encrypt and decrypt a text using the AWS KMS key. In this, we will use …
How to get an AWS KMS Key description in python with boto3
Python | Get an AWS KMS Key description in python with boto3 The describe_key() function is used to get the key description. It takes KeyArn and returns a dictionary having KeyMetadata. These are some necessary items …
How to get all keys from AWS KMS in python with boto3
Python | get all keys from AWS KMS in python with boto3 This is an example of how we can get all the CMK(Customer Master Key) from AWS KMS. To get all keys from AWS …
how to get the first 5 words from a string in python
Python | Get the first 5 words from a string This can be done by using the `split()` and `join()` methods >>> massage = 'Today is a sunny day but tomorrow it might rain' >>> …
Insert and Get data from an Elasticsearch index in python
Python | Insert and Get data from an index in Elasticsearch To do so we need to import the Elasticsearch package and create an instance of that by providing the host and port. >>> from elasticsearch …
Count number of words in a string in python
Python | Program to count the number of words in a string split() and len() method is used to get the number of words in a string. The split() method split a string into a list …