Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #N/A / N/A / Evo. - Petal Blizzard
- #N/A / N/A / 1 - Power Whip
- #1 - Tackle
- #1 - Growl
- #5 - Vine Whip
- #8 - Leech Seed
- #11 - Poison Powder
- #11 - Sleep Powder
- #14 - Take Down
- #17 / 19 - Razor Leaf
- #20 / 22 - Sweet Scent
- #23 / 25 - Double-Edge
- #26 / 28 - Worry Seed
- #29 / 31 - Seed Bomb
- #32 / 34 - Synthesis
- #35 / 37 / 42 - Petal Dance
- #38 / 40 / 48 - Solar Beam
- import pprint
- import sys
- highestEvo = 1
- file = open(sys.argv[1], "r")
- for line in file:
- line = line.replace("N/A", "NA")
- arr = line.split("/")
- if (len(arr) > highestEvo):
- highestEvo = len(arr)
- file.seek(0, 0)
- moves = {}
- moveIndex = {}
- for i in range(0, highestEvo):
- moves[i] = {}
- moveIndex[i] = 0
- for line in file:
- print(line)
- line = line.replace("N/A", "NA")
- arr = line.split("/")
- arrBkp = arr
- if len(arr) != highestEvo:
- for i in range(len(arr), highestEvo):
- arr[i] = arrBkp[-1]
- #for i in range(0, len(arr)):
- for j in range(0, highestEvo):
- if ("NA" not in arr[j]):
- moves[j][moveIndex[j]] = "MOVE_" + line.strip().split(" - ")[1].upper().replace(" ", "_").replace("-", "_")
- moveIndex[j] = moveIndex[j] + 1
- print(highestEvo)
- pprint.pp(moves)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement