Python dataclasses
Simple challenge to extract fields from a Python class
Start file
from dataclasses import dataclass
@dataclass
class Student:
student_id: str
name: str
age: int
score: float
fields = ""
End file
from dataclasses import dataclass
@dataclass
class Student:
student_id: str
name: str
age: int
score: float
fields = "student_id,name,age,score"
View Diff
10c10
< fields = ""
---
> fields = "student_id,name,age,score"
Solutions by @rpgenespanish:
Unlock 7 remaining solutions by signing in and submitting your own entry
Created by: @__ngtrongkha Tweet
300 active golfers, 1214 entries
Solutions by @rpgenespanish:
20
#>111 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:41PM
21
#>130 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:35PM
22
#>132 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:33PM
27
#>177 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:32PM
50
#>282 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:28PM
55
#>284 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:22PM