model-view-controller pattern write_name('names dat'namereturn "hi {}it is good to meet youformat(namedef main(name)print(get_message(name)if __name__ ="__main__"main(sys argv[ ] ' sure you suspect that there is more to come in terms of cleaning up this codeso why go through this process againthe reason for following these steps is that want you to get feel for when you need to deconstruct function or method if all programs stayed the way they were planned in the beginning of the projectthis sense of when and how to break things into smaller parts would not be needed following the same logicthe process is incremental you might start out like we didbreaking the program into functions after whilethe program grows significantlyand now the single file becomes burdena good sign that you need to break the one file program into separate files but how will you do thatwe will see as we grow our initial program they say always be youunless you can be lionin which case always be lion soin that spiritwe will now extend the program to display special message for certain argumentsspecifically lion import sys import os def get_append_write(filename)if os path exists(filename)return 'areturn 'wdef name_in_file(filenamename)if not os path exists(filename)return false return name in read_names(filenamedef read_names(filename)with open(filename' 'as data_filenames data_file read(split('\ '