So I've looked all over and I can't seem to find what I need, note I have found how to remove ONE of the duplicates but not BOTH. Here is my string:
["animals", "api", "away", "bancheck", "botlists",
"botstats", "bump", "core", "dblapi", "fun", "help",
"im", "info", "information", "lists", "moderation",
"modlog+", "promote", "recipe", "recycle bin",
"registration", "revimage", "server", "shop", "social",
"space", "spams", "spc", "speedtest", "streamalerts",
"support", "sysinfo", "testing", "user", "utility",
"watchfox", "welcome", "welcomer", "animals", "bancheck",
"botlists", "botstats", "core", "fun", "help", "im",
"info", "information", "moderation", "modlog+", "recipe",
"revimage", "server", "shop", "social", "space", "spams",
"spc", "speedtest", "support", "sysinfo", "testing", "user",
"utility", "watchfox", "welcome", "welcomer"]
These are the files for my Discord Bot, first is all of them and the second is the ones that are currently loaded. If you haven't figured out what I'm trying to do yet I'm trying to find the unloaded cogs, so I need to remove all duplicates from the list. Thank you!
I am using discord.py 1.0.0a and Python 3.5.2
This is my current code:
@commands.command()
async def unloaded(self, ctx):
cogs = sorted(os.listdir("/root/Python/Arctic-Fox/cogs"))
a = '{}'.format(sorted(cogs)).replace('\'utils\', ', '')\
.replace('\'__pycache__\', ', '').replace('.py', '')
b = str(self.db).replace('cogs.', '')
a1 = set(a)
b1 = set(b)
c = a1 | b1
await ctx.send("```{}```".format(c))
This is what I keep getting with the suggestions:
{'t', 'a', 'v', 'f', 'h', "'", 'k', 'd', 'c', 'i', 'l', 'p', '[', 'y', 'r', 'u', 'x', ' ', '+', ']', 'b', ',', 's', 'n', 'g', 'e', 'w', 'm', 'o'}
I really can't format on here and it's making me mad lol https://hastebin.com/irotuzafic.py