Skip to content

I don't understand the Deck class in Milestone Project 2 #39

Description

@MDSvensson

In particular what is bold here:

def __str__(self):
        deck_comp = ""
        for card in **self.cards**:
            **deck_comp += " " + deck_comp.__str__()**

        return "The deck has" + deck_comp

self.cards - how is self.cards known?
deck_comp.str() seems like a method for the general string function?

Thanks in advance.

A frustrated user.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions