from tkinter import *
w = Tk()
scrollbar = Scrollbar(w)
scrollbar.pack( side = RIGHT, fill = Y )
mylist = Listbox(w, yscrollcommand = scrollbar.set )
for line in range(50):
mylist.insert(END, 'This is Python Tutorial' + str(line))
mylist.pack( side = LEFT, fill = BOTH)
scrollbar.config( command = mylist.yview )
mainloop()
from tkinter import * # Import tkinter
root = Tk() # init the root window
scrollbar = Scrollbar(root) # assign the scrollbar to the root window
scrollbar.pack( side = RIGHT, fill = Y ) # put the scrollbar on the left side
mainloop() # the main loop
w = Scrollbar(master, option=value)
w = Scrollbar ( master, option, ... )