from tkinter import *
c = Canvas(width=160, height=100, bg='grey80')
c.pack()
oval = c.create_oval(30, 10, 130, 80, fill="orange")
def oval_func(event):
print("Зачем ты нажал на этот овал?")
def oval_func1(event):
print("Навел мышью да?")
c.tag_bind(oval, '<Button-1>', oval_func)
c.tag_bind(oval, '<Motion>', oval_func1)
const regex = /(\w+)=(\d+)/gm;
const str = `test=2
set=4`;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}