Skip to content

Tag: python

Why .join() didn’t work properly? (Python)

The code excludes vowels from a string. The code works, and print() does the job, but I need to return the result. I tried .join() but it didn’t work: it returns only the first character in my case, because the return stops the loop. How can I overcome this? Answer Try correcting your indentation: You c…

How to convert a dictionary with a tuple inside of a nested list?

I’m trying to create a bigram from a dictionary with a specific condition. Below is the example of the dictionary: The specific condition is that I want to create a bigram if the words in each element are more than 1. Below is the code that I have been working on so far: This code works, but instead of …