You can adjust the gap precisely using width as follows:
Here is an example of a very narrow gap:
plt.bar(departments, students, width=0.95)