Cheating is not tolerated. There is a large difference between stealing and collaboration, even if the end result looks the same (ie. you and other student have the same code).
Collaboration is when you ask each other for help or for explanations, you voluntarily share snippets of code, and take the time to explain/understand what has been shared.
Cheating is when you copy someone’s code to complete the homeworks without taking to the time to understand it, without letting them know, or without them explaining why they wrote what they did.
If we find two or more homework assignments with the same code we will check in with everyone involved to see if this was collaborative work or cheating.