from tkinter import *
r=Tk()
s=Scrollbar(r)
s.pack(side=RIGHT,fill=Y)

lb=Listbox(r)

lb.insert(1,"PHP")
lb.insert(2,"Python")
lb.insert(3,"Java")
lb.insert(4,".NET")
lb.insert(5,"PHP")
lb.insert(6,"Python")
lb.insert(7,"Java")
lb.insert(8,".NET")
lb.insert(9,"PHP")
lb.insert(10,"Python")
lb.insert(11,"Java")
lb.insert(12,".NET")
lb.insert(13,"PHP")
lb.insert(14,"Python")
lb.pack(side=LEFT,fill=Y)
lb.config(yscrollcommand=s.set)
s.config(command=lb.yview)
