Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution_py_mutable_immutable #2213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

raf2103
Copy link

@raf2103 raf2103 commented Feb 21, 2025

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the task requirements! 🎉 Your code correctly categorizes variables into mutable and immutable types, and you've constructed the sorted_variables dictionary as needed. The logic for identifying lists as mutable and tuples as immutable is spot on. Keep up the excellent work! If you want to further enhance your skills, consider exploring more about data structures and their properties. 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +27 to +28
elif type(data_item) is list:
mutable.append(data_item)

Choose a reason for hiding this comment

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

The logic here correctly identifies lists as mutable. However, ensure that tuples are correctly categorized as immutable in the else block, which is already handled correctly in line 32.

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