Python: Create all possible strings by using a, e, i, o, u
Python Basic - 1: Exercise-2 with Solution
Write a Python program that creates all possible strings using the letters 'a', 'e', 'i', 'o', and 'I'. Ensure that each character is used only once.
Python Code :
import random char_list = ['a','e','i','o','u'] random.shuffle(char_list) print(''.join(char_list))
Python Code Editor :
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Python function that takes a sequence of numbers and determines if all the numbers are different from each other.
Next: Write a Python program to remove and print every third number from a list of numbers until the list becomes empty.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join