-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpy2206.py
More file actions
39 lines (33 loc) · 708 Bytes
/
py2206.py
File metadata and controls
39 lines (33 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# codded by h4sski
'''
https://www.w3resource.com/python-exercises/basic/
2. Write a Python program to create all possible
strings by using 'a', 'e', 'i', 'o', 'u'.
Use the characters exactly once.
'''
input = ['a', 'e', 'i', 'o', 'u']
string = ''
for letter in input:
string += letter
print(string)
'''
i = 0
string = ''
while i < len(input):
j = i+1
string = input[i]
print(string)
while j < len(input) and j > i:
if i != j:
string += input[j]
k = i+1
while k < len(input) and k != j:
string += input[k]
print(string)
k += 1
j +=1
i += 1
'''
'''
pass throu all elements
'''