Remove items from one list if they contain strings from another list

I’m looking for the most efficient way to remove items from one list if they contain strings from another list. For example: B list contains: TomWentFishing SueStayedHome JohnGoesToSchool JimPlaysTennis A list contains: GoesToSchool SueStayed C list should contain: TomWentFishing JimPlaysTennis I’ve used this code, but it takes up a lot of time as the lists… Read More Remove items from one list if they contain strings from another list

pip and python referring to different interpreters

I know "multiple-versions-of-python-mess" is nothing new but my question is more specific. I’m learning how to use venv (and pyenv, etc.) and I’ve run into a strange situation. I have a number of different versions of python installed (as one does). I use one of them, 3.9, to create a venv: $ /usr/local/Cellar/python@3.9/3.9.12_1/bin/python3 -m venv… Read More pip and python referring to different interpreters

How do I fix "AttributeError: 'TextChannel' object has no attribute 'news'" in Pycord?

I have recently started using Pycord to make a Discord bot. However, I have quickly run into an error that I’m not sure how to deal with. Here is my code: import discord bot = discord.Bot(debug_guilds=[<my guild ID>]) @bot.event async def on_ready(): print(f’Logged in as {bot.user}!’) @bot.event async def on_message(message: discord.Message): print(message) bot.run(‘token’) Here is… Read More How do I fix "AttributeError: 'TextChannel' object has no attribute 'news'" in Pycord?

message = 'Hello ${name}' doesn't replace the name parameter in the message string immediately

I cannot make working the basic typescript feature that I see written everywhere over the Internet, that says that : var a = "Bob" var message = ‘Hello ${a}’ would see a console.log(message) print "Hello Bob". When I attempt this: import { Component } from ‘@angular/core’; import { environment } from ‘../environments/environment’; @Component({ selector: ‘app-root’,… Read More message = 'Hello ${name}' doesn't replace the name parameter in the message string immediately

Valgrind message: Conditional jump or move depends on uninitialised value(s) unresolved

i’m trying a new assignment i’ve got: i need to copy the Environment variables from the shell into an array, then lowercase them and print them back. (i’m using Ubuntu 20.04.4 LTS, gcc for compiling, and writing my code in C language). i was adviced to use malloc to create the array but decided not… Read More Valgrind message: Conditional jump or move depends on uninitialised value(s) unresolved