I'm creating a program that takes a string and converts each word in the string into a variable in ascending order from a-z. I like to name my variables in a certain way to make them easier for me to understand: s means statement, v means variable, l means list, w means word, le means length: so svlle would be statement variable list length
import time
svl = []
num = 0
letters = ['a' 'b' 'c' ... 'z']
print('test-05')
time.sleep(1)
s = input('statement:')
swl = s.split()
swlle = len(swl)
svlle = (letters[0:swlle])
while num < swlle:
svl.append(letters[num])
num = num + 1
num = 0
if ', '.join(svl) in globals():
while svl[num] < swlle:
svl[num] = swl[num]
num = num + 1
else:
print('failure?')
print(a)
print(b)
print(c)
time.sleep(3)`
I have no idea how to take all the letters from my svl and assign them as variables for all the words in my original statement. Keep in mind that I'm designing this to be able to accept any string up to a size of 26 words and take each word to make them into a variable!