Last active
June 29, 2023 10:52
-
-
Save AlgorithmAlchemy/3114fc724f378aa0afc224a902cc99f8 to your computer and use it in GitHub Desktop.
List adden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_parse_type = input("Select the type of gun to start parsing.\n\n" | |
"1 - all weapon\n" | |
"2 - Custom weapon\n" | |
"Please enter: ") | |
type_list = ['machinegun', 'smg', 'pistol', 'rifle', 'shotgun'] | |
parse_list = [] | |
if int(start_parse_type) == 1: | |
for i in type_list: | |
print(i) | |
elif int(start_parse_type) == 2: | |
print("\nEnter num to create custom parse list. ") | |
cont = 0 | |
for i in type_list: | |
print(i, "-", cont) | |
cont += 1 | |
print("parse_list delete - 5") | |
print("exit - 6") | |
while True: | |
custom = int(input("Please enter: ")) | |
if custom == 0: | |
parse_list.append(type_list[0]) | |
print(parse_list) | |
if custom == 1: | |
parse_list.append(type_list[1]) | |
print(parse_list) | |
if custom == 2: | |
parse_list.append(type_list[2]) | |
print(parse_list) | |
if custom == 3: | |
parse_list.append(type_list[3]) | |
print(parse_list) | |
if custom == 4: | |
parse_list.append(type_list[4]) | |
if custom == 5: | |
parse_list = [] | |
print("list deleted", parse_list) | |
if custom == 6: | |
print(parse_list, "- final list version") | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment