May 13, 2024, 2:18 a.m. | Kumatso1

DEV Community dev.to

I wrote this Python code but it is giving me this error shown in the screenshot and I don't know where it is coming from. I am a beginner in Python.



Program:

"""

This program defines the Album class with the specified attributes and string representation.

Then, it creates two lists albums1 and albums2, populates them with Album objects,

and performs various operations like sorting, swapping, copying, adding elements, and searching.

"""

class Album: # defineing Album class

def init …

beginner class code error giving lists python representation searching sorting string

Seeking Developers and Engineers for AI T-Shirt Generator Project

@ Chevon Hicks | Remote

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Stage - Product Owner Assistant - Data Platform / Business Intelligence (M/F)

@ Pernod Ricard | FR - Paris - The Island