Vikram Chiluka has Published 286 Articles

Python Program to Join strings by multiple delimiters

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:53:02

321 Views

In this article, we will learn how to join strings by multiple delimiters in python. Methods Used The following are the various methods to accomplish this task − Using List Comprehension and “+” Operator Using List Comprehension and join() Function Example Assume we have taken two input strings ... Read More

Python Program to Get word frequency in percentage

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:51:40

498 Views

In this article, we will learn how to get word frequency in percentage in python. Assume we have taken an input list of strings. We will now find the percentage of each word in the given input list of strings. Formula (Occurrence of X word / Total words) * ... Read More

Python program to find the sum of dictionary keys

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:49:49

2K+ Views

In this article, we will learn a python program to find the sum of dictionary keys. Methods Used The following are the various methods to accomplish this task − Using for loop Using dict.keys() and sum() functions Using reduce() function Using items() function Example Assume we have taken ... Read More

Python program to find the sum of Characters ascii values in String List

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:47:25

3K+ Views

In this article, we will learn a python program to find the sum of characters' ASCII values in a list of strings. Methods Used The following are the various methods to accomplish this task − Using for Loop, + operator, ord() function Using list Comprehension, sum(), ord() functions ... Read More

Python Program to Extract Strings with a digit

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:45:19

218 Views

In this article, we will learn how to extract strings with a digit in python. Methods Used The following are the various methods to accomplish this task − Using list comprehension, any() and isdigit() functions Using any(), filter() and lambda functions Without using any built-in functions Using ord() function ... Read More

Python program to count the number of spaces in string

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:43:40

6K+ Views

In this article, we will a python program to count the number of spaces in a string. Methods Used The following are the various methods to accomplish this task − Using for loop (with indexing) Using count() function Using isspace() function Using Counter() function Using countOf() function of the ... Read More

Python Program to Count of Words with specific letter

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:42:13

1K+ Views

In this article, we will learn how to count Words with a specific letter in a string in python. Methods Used The following are the various methods to accomplish this task − Using list comprehension, len() & split() functions Using split() & find() functions Using split(), replace() & len() ... Read More

Python program to concatenate every elements across lists

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:38:40

469 Views

In this article, we will learn a Python program to concatenate every element across lists. Methods Used The following are the various methods to accomplish this task − Using the List Comprehension and String Concatenation Using itertools.product() Function Example Assume we have taken two input lists. We will ... Read More

Python Program to Capitalize repeated characters in a string

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:37:38

237 Views

In this article, we will learn how to capitalize repeated characters in a string in python. Methods Used The following are the various methods to accomplish this task - Using Dictionary Hashing Using count() Function Using replace() and len() functions Using Counter() function Example Assume we have taken ... Read More

Python Program to Alternate list elements as key-value pairs

Vikram Chiluka

Vikram Chiluka

Updated on 27-Jan-2023 11:31:42

431 Views

In this article, we will learn how to get alternate list elements as key-value pairs in python. Assume we have taken an input list containing integers. We will now Methods Used The following are the various methods used to accomplish this task − Using for loop Using dictionary comprehension ... Read More

Previous 1 ... 7 8 9 10 11 ... 29 Next
Advertisements