Skip to content

Conversation

Yarinh55
Copy link

Adding my solution for challenge

@@ -0,0 +1,21 @@

def most_common_word(file_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for using functions
but, best practice, is to create few functions, with each one of them doing 1 thing only



if __name__== "__main__":
file_name = input("insert file path: ")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a bit risky to ask user to enter file name, if your decision is to do so, you man want to use some validation for his input

file_name = input("insert file path: ")
most_common_word(file_name)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make sure you code pass Flask8 lint validation

@Yarinh55
Copy link
Author

Yarinh55 commented Dec 7, 2019

Hi @AviadP
I split the code to functions and aligned it according to flake8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants