Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Liu committed Sep 5, 2023
1 parent 41d21e5 commit be3fa1f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dataclass/test1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from dataclasses import dataclass
import os

@dataclass
class Car:
brand : str
price : int



if __name__ == '__main__':
c1 = Car("tsla", 100)
print(f"{c1.brand}, {c1.price}")

0 comments on commit be3fa1f

Please sign in to comment.