member

Discord bot, how do I assign a role to the user you mentioned?

Discord bot, how do I assign a role to the user you mentioned? Question: Yes, I did everything through the Client, but I don’t need to enter a command, I just want to conduct a mini-game “zombie”, in which users pinging other users turned them into zombies. To do this, the bot must give a …

Total answers: 1

What's the difference between the square bracket and dot notations in Python?

What's the difference between the square bracket and dot notations in Python? Question: I come from a Javascript background (where properties can be accessed through both . and [] notation), so please forgive me, but what, exactly, is the difference between the two in Python? From my experimentation it seeems that [] should always be …

Total answers: 4

class variables is shared across all instances in python?

class variables is shared across all instances in python? Question: I started coding in python a week ago, it is my mistake i started coding using oops,classes and objects that soon. I assumed my C++ proficiency will help…. I got bit by the following code class A: var=0 list=[] def __init__(self): pass Here to my …

Total answers: 4

Instance variables vs. class variables in Python

Instance variables vs. class variables in Python Question: I have Python classes, of which I need only one instance at runtime, so it would be sufficient to have the attributes only once per class and not per instance. If there would be more than one instance (which won’t happen), all instance should have the same …

Total answers: 4