Loading...

Sequential Word Pairs

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior

Problem

Our NLP feature extractor needs bigram generation for the recommendation model. Write a function called find_bigrams that takes a string and returns a list of tuples, each containing two consecutive words from the input.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.