Skip to content

Conversation

noaAisen
Copy link

No description provided.

@@ -0,0 +1,13 @@
file = open("pizza.txt", "r")
Copy link
Contributor

Choose a reason for hiding this comment

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

When opening file it is mandatory to close it when its no longer needed. you can use "close" method, but better implementation would be to use "with...open"

@@ -0,0 +1,13 @@
file = open("pizza.txt", "r")
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 Better using full file path

data = file.read().split()
print(data)
dict={}
for i in data:
Copy link
Contributor

Choose a reason for hiding this comment

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

variable names should be clear and meaningful. in python it is not common to use 'i' as index var

@@ -0,0 +1,13 @@
file = open("pizza.txt", "r")
data = file.read().split()
print(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

This output may be useful for debugging, but not required as challenge results

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