from pylab import *
fig = plt.figure()
plt.plot([10, 5, 0, 7, 19, 34, 3])
xticks(range(7), ['пн', 'вт', 'ср', 'чт', 'пт', 'сб', 'вс'])
plt.ylabel('Количество объявлений')
plt.show()
def print_links_at_tail(link = nil)
if link === nil
link = @head
print_links_at_tail(link)
return # !!!!!!!!!!!!!!!!!!!!!!!!!!!!
end
print_links_at_tail(link.next_link) if link.next_link != nil
puts link.value
end
end
SELECT
calendar.*,
subjects.id,
subjects.subject_name,
teachers_users.full_name AS teach_name
FROM calendar
JOIN subjects ON calendar.subject = subjects.id
JOIN teachers_users ON subjects.subject_teacher = teachers_users.id
WHERE calendar.class = 1;
A = ['1.01', '2.01', '3.01', '5.02']
B = [['1.01', 'string'], ['3.01', 'string'], ['7.01', 'string'], ['10.01', 'string']]
print(set(A).intersection(e[0] for e in B))
from operator import itemgetter
print(set(A).intersection(map(itemgetter(0), B)))