Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Numerical alphabet
- #Globals
- i = 0
- j = 0
- k = 0
- isRunning = False
- isNotRunning = not isRunning
- class Alphabet():
- def __init__(self):
- self.alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r",
- "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
- "!", "@", "#", "%", "^", "&", "*", "(", ")"]
- # Function to get a letter
- def get_letter(self, letter):
- letter = self.alphabet[letter]
- return letter
- # Function to print a letter to console
- def print_letter(self, letter):
- return print(self.alphabet[letter])
- def get_all(self):
- for x in self.alphabet:
- print(str(x))
- #instantiation
- alpha = Alphabet()
- #alpha.print_letter(3)
- #Run
- file = open("test1.txt","w")
- for y in alpha.alphabet:
- writer = str(y)
- file.write(writer)
- file.write("\n")
- for z in alpha.alphabet:
- writer = str(y+z)
- file.write(writer)
- file.write("\n")
- for za in alpha.alphabet:
- writer = str(y+z+za)
- file.write(writer)
- file.write("\n")
- for zb in alpha.alphabet:
- writer = str(y+z+za+zb)
- file.write(writer)
- file.write("\n")
- for zc in alpha.alphabet:
- writer = str(y+z+za+zb+zc)
- file.write(writer)
- file.write("\n")
- for zd in alpha.alphabet:
- writer = str(y + z + za + zb + zc + zd)
- file.write(writer)
- file.write("\n")
- for ze in alpha.alphabet:
- writer = str(y + z + za + zb + zc + zd +ze)
- file.write(writer)
- file.write("\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement