Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
from collections import deque vowels = deque(x for x in input().split()) consonants = [x for x in input().split()] searched_words = ['rose', 'tulip', 'lotus', 'daffodil'] found_word = set() while True: if len(vowels) == 0: break if len(consonants) == 0: break first_vowel = vowels.popleft() last_consonant = consonants.pop() for word in searched_words: for letter in word: if first_vowel == letter: found_word.add(letter) if last_consonant == letter: found_word.add(letter) print(found_word)
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)