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
308 active golfers, 1229 entries
Solutions by @rpgenespanish:
20
#>113 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:41PM
21
#>132 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:35PM
22
#>134 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:33PM
27
#>181 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:32PM
50
#>290 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:28PM
55
#>292 - i just want to download stuff and not give my info / @rpgenespanish
04/14/2023 at 08:22PM
VimGolf