#NEWLINE# def add_link( link , topic = 'General' ) : #NEWLINE# #INDENT# if ( topic in d . keys ( ) ) : #NEWLINE# #INDENT# if ( link not in d [ topic ] ) : #NEWLINE# #INDENT# temp = d [ topic ] #NEWLINE# temp . append ( link ) #NEWLINE# d [ topic ] = temp #NEWLINE# print ( 'Updated .. {}' . format ( topic ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( '{} already exists in {}!!' . format ( link , topic ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'Created new category .. {}' . format ( topic ) ) #NEWLINE# d [ topic ] = [ link ]